Form with 2 Subforms

D

depawl

I have a form with a combo box and two subforms. When I select a
vendor's name from the combo box, the vendor's info (address, phone,
etc.) appear in the first subform (this is mainly for the user's info).
What I would like is to have the vendorID also appear in the second
subform (and populate the table), which is where the user enters data
for new items purchased and added to stock. I've tried putting code in
the "On Current" event of both subforms and the "After Update" event of
the combo box, but no luck yet.
Any ideas?
Thanks.
 
R

Ronald W. Roberts

depawl said:
I have a form with a combo box and two subforms. When I select a
vendor's name from the combo box, the vendor's info (address, phone,
etc.) appear in the first subform (this is mainly for the user's
info). What I would like is to have the vendorID also appear in the
second subform (and populate the table), which is where the user
enters data for new items purchased and added to stock. I've tried
putting code in the "On Current" event of both subforms and the "After
Update" event of the combo box, but no luck yet.
Any ideas?
Thanks.
The easy way is to make your main form the Vendor information form and
have a subform for the new items. Then you
set the link of parent/child to VendorID.

Another way is to keep your main form the way it is and put the second
subform in the first subform. This will work
the same as above with the exception you have a main form that is not
needed.

Ron
 
D

depawl

Ronald:
My Main form has the information for the item (stock no., amount on
hand, etc.), the vendor information is from another table as is the
information about the quantity purchased, etc. Three forms, three
tables. So I really need all 3 forms (one main and 2 sub). And I need
to input data into the second subform from an item selected in a combo
box which is not linked to it. Seems I should somehow be able to pull
the value of the Vendor ID from either the combo box or the first
subform, no?
 

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