2 listboxes, 1 selected, 1 to display

will

Registered User.
Local time
Today, 15:19
Joined
Jul 11, 2001
Messages
18
Hello,

I have a form with two listboxes on it. The first list box displays all the orders. When a user clicks on a certain order in the listbox, I need the 2nd listbox to display all the associated items on that order. My linked field is an ID field that I have in in the query of easch List box.

I need the code to run after I select the order and to display "on the fly" the associated items with that OrderID. Any help you guys can offer would be much appreciated. Thanks!
 
The query that serves as the rowsource for the second combo must use selection criteria that refers to the order number of the first combo. Then in the AfterUpdate event of the first combo, you need to requery the second combo.
 
OK, I understand that part of it, what I dont understand is how I can tell the 2nd list box to "select all records where 1stlistbox.ID = 2ndlistbox.ID", basically setting the rowsource of the 2ndlistbox to the field of a query in the rowsource for the first listbox. If you can understand what I mean, hopefully you can help me, thanks!
 
Open the query for the second combobox. In the criteria line of the appropriate field, type the name of the first combo box in the form:

Forms!YourFormName!YourFirstComoboxName
 

Users who are viewing this thread

Back
Top Bottom