limit one list box data set based on selection in another list box

W

WB

I am using Access 2k to resolve a form problem where multiple list boxes are
partially dependant on the value(s) in other list boxes. I keep reading
that an unbound list box can be populated with data from the value of
another list box, but how to do it is not explained.

I have Vendors, Mfr, and ProductLines with list boxes for each. A vendor
supplies the manufacturer's product lines. What I want to have done is the
mfr list and productline list fill in the appropriate (related) data based
on the vendor. The tables are normalized and all the key values are present
(vendorid, mfrId, PLid, etc.)

Any suggestions?

WB
 
K

Klatuu

If they are not multi select, I would suggest using combo boxes instead of
list boxes. They are much easier to use.
The technique is to create a query as the row source for the second combo
that is filtered by the value in the first (The same can be used for list
boxes). It would be something like:

Select MfrId, MfrName FROM tblMfgr WHERE VendorID = cboVendor;

Then in the After Update event of the Vendor Combo, requery the Mfgr Combo

Me.cboMfgr.Requery

Same for the 3rd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top