"Linked" List Boxes in Form

J

Jason

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!
 
C

Carl Rapson

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
 
J

Jason

Thanks, Carl, that indeed worked perfectly!

Carl Rapson said:
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
 
Top