Limit items in combo box

I

Ivor Williams

I have a main form with a subform linked using VendorID. On the subform is a
combo box PartNo which gets its data from a query which includes a table
tblParts. I would like to limit the list of parts in the combo box PartNo to
those parts supplied by the vendor chosen in the main form. How can I do
this?

Ivor
 
R

Rick Brandt

Ivor said:
I have a main form with a subform linked using VendorID. On the
subform is a combo box PartNo which gets its data from a query which
includes a table tblParts. I would like to limit the list of parts in
the combo box PartNo to those parts supplied by the vendor chosen in
the main form. How can I do this?

Ivor

The RowSource query of the ComboBox needs to include a reference to the VendorID
field on the main form...

SELECT PartNo
FROM tblParts
WHERE VendorID = Forms!MainFormName!VendorID
 

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