Table relationship question

J

Judy

I've created two tables one called tblFileInformation the
other tblChecklist, with a one-to-many relationship
between the two tables with FileInformationID as the
common denominator with a join type of 1 - include rows
where the joined field from both tables is equal. The
problem that I'm having is that when I go to the
FileInformation table I'm noticing that the CheckListID
for tblChecklist is not populating in the
tblFileInformation table even though the field is there.
CheckListID is the primary key for tblCheckList and a
field in tblFileInformation (it is populating in
tblChecklist).

The way the two tables interact is tblFileInformation
holds the client and file number information and
tblCheckList contains a listing of items that are checked
off upon completion of the file. tblFileInformation is
the main form and tblChecklist is the sub form within the
main form. Is the relationship incorrect? Each file can
only contain one checklist, so I'm not sure how else to
define the relationship, any help would be greatly
appreciated.
 
J

John Vinson

I've created two tables one called tblFileInformation the
other tblChecklist, with a one-to-many relationship
between the two tables with FileInformationID as the
common denominator with a join type of 1 - include rows
where the joined field from both tables is equal. The
problem that I'm having is that when I go to the
FileInformation table I'm noticing that the CheckListID
for tblChecklist is not populating in the
tblFileInformation table even though the field is there.
CheckListID is the primary key for tblCheckList and a
field in tblFileInformation (it is populating in
tblChecklist).

The way the two tables interact is tblFileInformation
holds the client and file number information and
tblCheckList contains a listing of items that are checked
off upon completion of the file. tblFileInformation is
the main form and tblChecklist is the sub form within the
main form. Is the relationship incorrect? Each file can
only contain one checklist, so I'm not sure how else to
define the relationship, any help would be greatly
appreciated.

You're confusing Forms with Tables, and the way relationships work. A
relationship *constrains* what you can add to tblChecklist; it will
prevent you adding a record without a corresponding FileInformationID
in tblFileInformation, but it will not automagically create a new
record in tblChecklist. What's the datatype of CheckListID? It will
only fill in automatically if it's an Autonumber.

If you have a Form based on tblFileInformation, and a Subform based on
tblChecklist; and if you use FileInformationID as the Master and Child
Link Fields on the subform; *and* if you enter data into the Subform,
the new record will inherit the mainform's FileInformationID. But
until you actually type something onto the subform, no new record will
be created.
 

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