borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (how to record beginning inventory daily in MS access without suffering the size of my database)Next Topic (Sql service) New Topic New Poll Post Reply
AndreaVB Forum : Database : How can I achieve this?
Poster Message
sneha
Level: Scholar

Registered: 28-03-2006
Posts: 29

icon How can I achieve this?

Hi,

How can I get the Opening Balance & the Customer Name from the "Customers" table for the customer which is selected in the lvwSales or lvwCollections? Some more details are in attached jpg. I need all these for the "GetBalance" command button to work properly.

How can I get out of this problem.

Thanks in advance for any help.

Sneha

[Edited by sneha on 27-04-2006 at 08:58 PM GMT]

____________________________
Sneha

____________________________
Attached:
MyProject.zip 48 KB (Downloads: 3)

27-04-2006 at 12:56 PM
View Profile Send Email to User Show All Posts | Quote Reply
sneha
Level: Scholar

Registered: 28-03-2006
Posts: 29
icon Re: How can I achieve this?

quote:
sneha wrote:
Hi,

How can I get the Opening Balance & the Customer Name from the "Customers" table for the customer which is selected in the lvwSales or lvwCollections? Some more details are in attached jpg. I need all these for the "GetBalance" command button to work properly.

How can I get out of this problem.

Thanks in advance for any help.

Sneha

Please see the attached jpg file.

[Edited by sneha on 27-04-2006 at 08:58 PM GMT]



____________________________
Sneha

____________________________
Attached:
Help.jpg (99 KB)
27-04-2006 at 01:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
xtramac
Level: Professor


Registered: 28-08-2005
Posts: 89
icon Re: How can I achieve this?

hello sneha,

you need to to put the code on the click event of your listview control....

ex.


Private Sub lvwSales_Click()
Dim CustName As String

CustName = lvwSales.SelectedItem.Text

'you can use Custname as you part of the criteria in your query

rs.open "select Balance, CustomerName from Customers where CustomerName = '" & CustName & "'", etc

txtBalance.Text = rs!Balance
txtCustomerName.Text = rs!CustomerName

End Sub



you can do the same for the Collections listview..

    

andrew

[Edited by xtramac on 28-04-2006 at 10:46 AM GMT]

28-04-2006 at 02:45 AM
View Profile Send Email to User Show All Posts | Quote Reply
sneha
Level: Scholar

Registered: 28-03-2006
Posts: 29
icon Re: How can I achieve this?

quote:
xtramac wrote:
hello sneha,

you need to to put the code on the click event of your listview control....

andrew


Hi, Thanks a lot for your kind help. It works fine except sometimes I am getting the following error as attached.

Regards.

Sneha.


____________________________
Sneha

____________________________
Attached:
Error3021.jpg (46 KB)
29-04-2006 at 10:10 AM
View Profile Send Email to User Show All Posts | Quote Reply
xtramac
Level: Professor


Registered: 28-08-2005
Posts: 89
icon Re: How can I achieve this?

hello,

can you post the line where you get the error?? this is related to your recordset....

  

andrew

08-05-2006 at 02:15 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : How can I achieve this?
Previous Topic (how to record beginning inventory daily in MS access without suffering the size of my database)Next Topic (Sql service) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder