If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Linked" List Boxes in Form
Hello,
I have a list of sales rep names in one list box that I'd like to have associated with multiple records of their sales in a second list box on a form. Essentially, when a user clicks on a name on the left list box, the right list box displays all the sales in the database under that name in a one-to-many type relationship. I'm having a little trouble figuring out the right approach for this. Should I add code to the left list box to query, or is it better to use a sub-form here? Thanks! |
#2
|
|||
|
|||
"Linked" List Boxes in Form
In the first listbox's AfterUpdate or Click event (either should work),
modify the second listbox's RowSource based on the selection in the first listbox. That's always worked for me. Carl Rapson "Jason" wrote in message ... Hello, I have a list of sales rep names in one list box that I'd like to have associated with multiple records of their sales in a second list box on a form. Essentially, when a user clicks on a name on the left list box, the right list box displays all the sales in the database under that name in a one-to-many type relationship. I'm having a little trouble figuring out the right approach for this. Should I add code to the left list box to query, or is it better to use a sub-form here? Thanks! |
#3
|
|||
|
|||
"Linked" List Boxes in Form
Thanks, Carl, that indeed worked perfectly!
"Carl Rapson" wrote: In the first listbox's AfterUpdate or Click event (either should work), modify the second listbox's RowSource based on the selection in the first listbox. That's always worked for me. Carl Rapson "Jason" wrote in message ... Hello, I have a list of sales rep names in one list box that I'd like to have associated with multiple records of their sales in a second list box on a form. Essentially, when a user clicks on a name on the left list box, the right list box displays all the sales in the database under that name in a one-to-many type relationship. I'm having a little trouble figuring out the right approach for this. Should I add code to the left list box to query, or is it better to use a sub-form here? Thanks! |
Thread Tools | |
Display Modes | |
|
|