subform allowing orphan records

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
 
A

Allen Browne

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
 

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