subform allowing orphan records

  • Thread starter Thread starter pcurran
  • Start date Start date
P

pcurran

My application consists of 3 levels of tables. The Contact record i
the parent of the Contact Detail which is the parent of 2 types o
records, Presenting Issues and Info Provided. All keys are autonumber
The relationships are 1 to many with Referential Integrity checked.

I have 1 Contact form which contains a subform for the Contact detai
which contains 2 subforms for the Issues & Info. If a user enters dat
in the subforms, orphan records are created. How do I prevent this?

Thank yo
 
You are correct. Referential Integrity does not prevent a Null foreign key.

Open the child table in design view.
Select the foreign key field.
In the lower pane, set the Required property to Yes.

This is one of 6 isses addressed in article:
Common Errors with Null
at:
http://allenbrowne.com/casu-12.html
 
Back
Top