Form and Subform - Filter? Query? Help!

M

Mason

I have a purchase order form. On the main form I have a combo box that lists
the suppliers (SupplierID). On the subform there is a combo box that lists
all the available products (ProductID). Currently when you click on the
ProductID box, it lists every available product from every supplier. I would
like it to be limited to only the products available from the supplier chosen
on the main form. I know that there is probably a simple way to do this, but
I haven't been able to figure it out! Please help!
 
M

Mason

Thank you! It worked.

Beth said:
I won't pretend to be an expert on this stuff, so someone else may have a
cleaner way to do this.

In the main form, you have the SupplierID as a combo box (named
cboSupplierID).
In the subform ProductId field, choose the RowSource property and go to the
builder. Add a column for the SupplierID from the products table. In the
Criteria row add the condition [Forms]![ParentFormName]![cboSupplierID].
Save all that and it should limit the product list to those products
provided by the supplier you choose in the main form.

Good luck,
beth



Mason said:
I have a purchase order form. On the main form I have a combo box that
lists
the suppliers (SupplierID). On the subform there is a combo box that
lists
all the available products (ProductID). Currently when you click on the
ProductID box, it lists every available product from every supplier. I
would
like it to be limited to only the products available from the supplier
chosen
on the main form. I know that there is probably a simple way to do this,
but
I haven't been able to figure it out! Please help!
 

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