Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / February 2008

Tip: Looking for answers? Try searching our database.

cascading delete

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jlute@marzetti.com - 25 Feb 2008 15:54 GMT
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?
Jerry Whittle - 25 Feb 2008 16:38 GMT
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?
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> 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?
jlute@marzetti.com - 25 Feb 2008 17:18 GMT
Hi, Jerry!

On Feb 25, 11:38 am, Jerry Whittle
<JerryWhit...@discussions.microsoft.com> wrote:
> 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!
jlute@marzetti.com - 25 Feb 2008 17:56 GMT
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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.