Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foreign Key not allowing null values

Status
Not open for further replies.

grantwilliams

Programmer
Sep 8, 2003
66
AU
G'day all,

I've got an Access 2003 database that I'm developing for some work colleagues and I'm having problem with a couple of forms not allowing me to leave foreign key fields with a null value. I can however leave these fields null if I enter data directly into the table or the query that feeds into the forms.

Has anyone seen this before? Is it a form property that needs to be changed?

Thanks in advance for any hints or questions you have for further info!

Grant
 
Hi Grant,

I have seen similar issues in the past where Referential Integrity is the cause of this behaviour.

I believe that your child records must always relate to the parent record anyway, otherwise your data can contain "orphaned" records etc.

Are you dealing with a Form/Sub form situation?

Peter

Remember- It's nice to be important,
but it's important to be nice :)
 
Thanks Peter,

Yes, I'm using a form/subform.

What confuses me most is that I had it working then suffered a corruption of my database, which prevented me opening the front end file. I then took a backup copy and imported the new forms, queries etc. It was only after I did this that I encountered this problem.

Thanks,

Grant
 
I've resolved this now - it was a matter of changing the inner joins in the queries that feed into the forms with right and left joins. For some reason it did work with inner joins previously, but since the corruption of the front end file, they no longer work.

Grant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top