cascading delete

  • Thread starter Thread starter jlute
  • Start date Start date
J

jlute

I have tables that are deleting "backwards". For example tblA is the
parent of tblB and tblB is the parent of tblC. When I delete a record
from tblC (through its form which is a subform) it cascades back and
deletes the parent record in tblA. I've never encountered this before.
Can anyone explain? Maybe I'm having a brain cramp but aren't records
supposed to cascade "forward" only?
 
Are the relationships between these tables set up in the Relationships window
with Referiential Integrity and Cascade Delete set? If not, it's not a
cascade delete problem. If so make sure which way the 1 - infinity symbols
are what you expect.

What does the code say that deletes the record in the subform? Or are you
deleting using the delete key or something similar?
 
Hi, Jerry!

Are the relationships between these tables set up in the Relationships window
with Referiential Integrity and Cascade Delete set?
Yes.

If so make sure which way the 1 - infinity symbols are what you expect.

They absolutely are. In fact, the tables are setup EXACTLY the same as
another group of tables that link back to the same parent table. The
other group of tables deletes fine! This is very puzzling.
What does the code say that deletes the record in the subform? Or are you deleting using the delete key or something similar?

I'm using Access' "Delete Record" button. I get the expected "You're
about to delete...and in related tables..." message. When I click
"Yes" the records delete and "#Deleted" appears in the parent form's
controls!
 
I FOUND IT!

I had the parent table in the Record Source of the subform!!! I put it
in there for whatever reason (test or something) and had forgotten
about it.

Yeesh!

Thanks for your help! Sorry to have wasted any time!
 
Back
Top