Form/SubForm Question

D

depawl

I'm trying to have a subform list values for a selection from a combo
box on the main form. For example:
My main form is based on an "inventory" table that has a field for a
vendorID # of the vendor that the item was purchased from. The combo box
lists the names of the various vendors and is also used to populate the
vendorID field in the inventory table. When I select one of the vendors
from this combo box, I would like the subform (based on a "vendor"
table) to list the details (address, phone number, etc.) for the
selected vendor only. The two tables are linked via the vendorID #.
Doesn't seem like it should be that difficult but I've been struggling
for quite a while and haven't gotten it yet.
Thanks.
 
R

Rick Brandt

depawl said:
I'm trying to have a subform list values for a selection from a combo
box on the main form. For example:
My main form is based on an "inventory" table that has a field for a
vendorID # of the vendor that the item was purchased from. The combo box
lists the names of the various vendors and is also used to populate the
vendorID field in the inventory table. When I select one of the vendors
from this combo box, I would like the subform (based on a "vendor"
table) to list the details (address, phone number, etc.) for the
selected vendor only. The two tables are linked via the vendorID #.
Doesn't seem like it should be that difficult but I've been struggling
for quite a while and haven't gotten it yet.
Thanks.

You should be able to use the MasterLink and ChildLink properties of the subform
control for this. Set the ChildLink to the VendorID field in the subform and
the MasterLink to the name of the ComboBox.
 

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