cascade delete warning

G

Guest

goodmorning access gods:

how do you get access to give you a "cascading delete warning" if you delete
a record in a "primary" table?

in other words, assume that your database consists of 2 tables: [primary] &
[sub].
the relationships are set up so that access:
1. enforces referential integrity
2. cascades updates for related fields
3. cascades delete related records
is there a way to warn a user that if he/she deletes a record in [primary],
he/she will wind up deleting related records in [sub]. (one of our users
decided to delete all records in [primary] and paste append a large number of
edits back into [primary]. when we looked at [sub], everything was gone!
this could have been prevented if access fed us a warning prior to deleting
the record in [primary]...we would have remembered to change the relationship
settings.

thanks in advance,
 
B

Brian

Robert said:
goodmorning access gods:

how do you get access to give you a "cascading delete warning" if you delete
a record in a "primary" table?

in other words, assume that your database consists of 2 tables: [primary] &
[sub].
the relationships are set up so that access:
1. enforces referential integrity
2. cascades updates for related fields
3. cascades delete related records
is there a way to warn a user that if he/she deletes a record in [primary],
he/she will wind up deleting related records in [sub]. (one of our users
decided to delete all records in [primary] and paste append a large number of
edits back into [primary]. when we looked at [sub], everything was gone!
this could have been prevented if access fed us a warning prior to deleting
the record in [primary]...we would have remembered to change the relationship
settings.

thanks in advance,

On the Tools menu, open Options and click on the Edit/Find tab. Make sure
there is a tick against Confirm Record Changes.
 
V

Van T. Dinh

For this reason, I hardly ever use Cascade Delete. Since virtually all my
users use Forms to enter / edit data, I simply write code to delete the
Child Records before deleting the Parent Record.

HTH
Van T. Dinh
MVP (Access)
 
T

Tony Toews

Van T. Dinh said:
For this reason, I hardly ever use Cascade Delete. Since virtually all my
users use Forms to enter / edit data, I simply write code to delete the
Child Records before deleting the Parent Record.

Agreed. Also the message the user gets isn't that much different than
the standard delete message. Real easy for a user to not realize what
is all happening.

I have an intense dislike for cascade deletes in Microsoft Access.
And I don't like cascade updates.
http://www.granite.ab.ca/access/cascadeupdatedelete.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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