How does one turn on the function to "cascade deletions"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to delete records and the records in the Linking Tables that refer to
that record's ID number (i.e., those linked with referential integrity). I
have been told to turn on "cascade deletions," but I don't know how.
 
Open the Relationships window from the normal database window. If the tables
that you want to do this with are not showing, add them to the window.

If there are not already relationships established between those tables,
drag the field from one onto the linking field in the other table; a window
will pop up and let you specify the relationship. Be sure to check
Referential Integrity box and the Cascade delete box.

If the relationship already exists, double-click on the join line, and
you'll see the same window described above.
 
I want to delete records and the records in the Linking Tables that refer to
that record's ID number (i.e., those linked with referential integrity). I
have been told to turn on "cascade deletions," but I don't know how.

Open the Relationships Window (the icon with three little boxes
connected by lines). Select the relationship *line* joining the two
tables in question; a popup window will appear showing that
relationship's properties. Be sure that the "Relational Integrity" box
is checked, and also check the "Cascade Deletes" box.

Note that this is somewhat of a sledgehammer: if you delete a record
in the "one" side table, it will give you one, brief, easily ignored
warning and then permanently and irrevokably delete that record and
*EVERY* record in the related table which was joined to that record.
There's a real potential for "oops, I didn't mean THAT record"
moments!

John W. Vinson[MVP]
 
A very big oops is that Cascade Delete can propagate throughout your whole
database. If you have Cascade Delete enforced between the many table and a
third table, all related records in the third table will be deleted when you
delete a record from the first table. Likewise if you have Cascade Delete
enforced between the third table and say a fourth, a fifth and a sixth
table, deleting a record in the first table will delete records in tables 2
to 6.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 
Back
Top