Help Creating Form

R

rnjalston

I have 5 tables: Manufacturers, Products, Brands, Varieties, Sizes.

I would like a combobox Manufacturer that would filter a Products combobox
that would in turn filter a Brands combobox. After selecting a Brand from
the Brand combobox, I need to enter several Varieties for each Brand and
several Sizes (Size, Unit, Pkg) for each Variety.

Please help. I am new to this. I have the relations set in the order that
the tables appear on the 1st line of this post.
 
J

John W. Vinson

I have 5 tables: Manufacturers, Products, Brands, Varieties, Sizes.

I would like a combobox Manufacturer that would filter a Products combobox
that would in turn filter a Brands combobox. After selecting a Brand from
the Brand combobox, I need to enter several Varieties for each Brand and
several Sizes (Size, Unit, Pkg) for each Variety.

Please help. I am new to this. I have the relations set in the order that
the tables appear on the 1st line of this post.

This is a pretty common situation; the solution is what's often called
"conditional combo boxes".

On your Form, put a Manufacturer combo box (cboMfgr let's call it). It should
have the ManufacturerID as the bound column (it probably will anyway if you're
using it to update the manufacturer field in the form's recordsource).

Create a Query as the rowsource for the Product combo. I presume that the
Products table contains a ManufacturerID; if so, use

=[Forms]![YourFormNameHere]![cboMfgr]

as a criterion on the field. This will limit the Product combo box to products
from this manufacturer.

You will need one line of code, or a macro, in the AfterUpdate event of
cboMfgr; it needs to Requery cboProduct.

Repeat this process at each link of the chain.
 

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