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 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:
27-04-2006 at 01:03 PM
|
xtramac Level: Professor Registered: 28-08-2005 Posts: 89
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