Problems with a list box

Stefanovski

Registered User.
Local time
Today, 05:43
Joined
Jan 7, 2005
Messages
21
Hello folks,

I have a following problem. I have two tables and two forms: frmCustomers and frmInvoices. Tables are related to each other by "one to many" relationship. On the frmCustomers I have a list box and each invoice of selected customer from frmInvoices is listed in it. Now I would like to open frmInvoices by double-click in this list box and frmInvoices should show me the invoice that I have selected in the list box. But somehow I am not able to do it.
Can someone help me with this matter? If you have a .mdb sample of it, it would be even better.

Thanks for any suggestion
 
The value of the listbox has to be the InvoiceID. You can see where you're at by placing in the AfterUpdate of the listbox:
MsgBox Me.[Mylistbox]
If the value in the msgbox is not an invoiceID, you need to change the settings of your listbox...then you can add code to open your Invoice form to a certain invoice (using the Filter argument of the OpenForm method.
 

Users who are viewing this thread

Back
Top Bottom