Form/SubForm Question

  • Thread starter Thread starter depawl
  • Start date Start date
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.
 
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.
 
Back
Top