Primary Key & Foriegn Key

T

TSG

How do I mke sure that my related tables update the correct records in a
one-to-many relationship. For example, I'm creating a database for
teachers to use in the classroom, so I have a studpersonal table and a
parent conference table that are related so that a teacher can record
the outcomes of a parent conference. Well, my PK and FK seem to be out
of sync because the information gets posted to the wrong student record
when I use the form and subform to enter the information. I have a
combo box on the main form to select the correct student and a subform
to record the conference info. Is my structure or something wrong?
Have I provided enough info?
 
J

John Vinson

How do I mke sure that my related tables update the correct records in a
one-to-many relationship. For example, I'm creating a database for
teachers to use in the classroom, so I have a studpersonal table and a
parent conference table that are related so that a teacher can record
the outcomes of a parent conference. Well, my PK and FK seem to be out
of sync because the information gets posted to the wrong student record
when I use the form and subform to enter the information. I have a
combo box on the main form to select the correct student and a subform
to record the conference info. Is my structure or something wrong?
Have I provided enough info?

The link from primary key to foreign key is implemented using the
Master Link Field and Child Link Field properties of the Subform
control; the Master should be the name of the primary key of the
mainform's table, and the Child should be the name of the foreign key
field in the subform's recordsource. Are these correct?

Just having a table relationship does NOT cause anything to
automagically get filled in anywhere!

John W. Vinson[MVP]
 

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