Referential Integrity not effective in forms

S

Sally

I have a Access2000 db split. Extensive forms have
already been created based on queries. I have now gone
back to back-end to set referential integrity to prevent
users from deleting data. Users can't delete a record in
the table that other tables are using. This is also true
for a new form I created based only on one table. But
the form I created prior to setting ref integrity using
multiple tables in a query does not support the
referential integrity and allows users to delete records,
thus creating orphaned data.

How can this be resolved? Thank you!
 
J

John Vinson

I have a Access2000 db split. Extensive forms have
already been created based on queries. I have now gone
back to back-end to set referential integrity to prevent
users from deleting data. Users can't delete a record in
the table that other tables are using. This is also true
for a new form I created based only on one table. But
the form I created prior to setting ref integrity using
multiple tables in a query does not support the
referential integrity and allows users to delete records,
thus creating orphaned data.

How can this be resolved? Thank you!

There's something wrong with the form's Recordsource: forms CANNOT
override referential integrity, it's right there in the database
engine! Are you CERTAIN that this form might not be pointing to a
second set of tables, perhaps in the frontend?
 
G

Guest

So in theory in should work and split db doesn't matter? Does fact that multiple tables in query or that ref int wasn't set prior to form being made? No tables in the front-end.
 
A

Allen Browne

You have understood John correctly.

Referential Integrity is enforced at the engine level, regardless of how or
where the entry is updated. If the tables in the back end have relations
with RI, it will be enforced when the records are edited.

You are aware that RI does not prevent Null foreign keys?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sally said:
So in theory in should work and split db doesn't matter? Does fact that
multiple tables in query or that ref int wasn't set prior to form being
made? No tables in the front-end.
 

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