Subform items not saving

G

Guest

I am creating a new dbase that will be used similar to a bill of material
(BOM). My problem resides with making the two primary Tables to interact
correctly together. I have created a main data entry form and a Subform that
will be used inside the main Form. The main form will be used to select
parent item numbers and the subform will be used to assign multiple component
items to the parent number. Both the parent items and the component items
have their own separate tables. I am creating my forms directly from the
Tables. The parent table has a component field that is linked to the
component Table. I have the parent form functioning properly and allowing me
to assign multiple components to the parent item number, however these
component numbers are not being saved when I return to the record number in
the form. Please help! Am I way off base or should I find a sample dbase to
use instead? Thank you for any assistance that anyone can provide!
 
S

Scott McDaniel

I am creating a new dbase that will be used similar to a bill of material
(BOM). My problem resides with making the two primary Tables to interact
correctly together. I have created a main data entry form and a Subform that
will be used inside the main Form. The main form will be used to select
parent item numbers and the subform will be used to assign multiple component
items to the parent number. Both the parent items and the component items
have their own separate tables. I am creating my forms directly from the
Tables. The parent table has a component field that is linked to the
component Table. I have the parent form functioning properly and allowing me
to assign multiple components to the parent item number, however these
component numbers are not being saved when I return to the record number in
the form. Please help! Am I way off base or should I find a sample dbase to
use instead? Thank you for any assistance that anyone can provide!

The Child should store the ParentID ... not the other way around. In your description, you say the "parent table has a
component field that is linked to the component table" ... this would mean that only ONE Component could be associated
with a single Parent. Instead:

tParent
------------
lParentID [PK]
sName
sOtherStuff

tComponents
----------------
lComponentID [PK]
lParentID [FK to tParent]
sName
etc etc

In this setup, you would use your Main form to show info on from tParent, and then use your subform to show info from
tComponents ... set th Master/Child link fields to lParentID, and you should be good


Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 

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