Prevent records from deleting

  • Thread starter Thread starter Sammy
  • Start date Start date
S

Sammy

I have a table upon which many queries & forms are
based. I keep loosing records, and I suspect this is
caused somewhere along the way by VISUAL BASIC CODE used
to automate my database. How can I globally prevent
records from being deleted in this table? Thanks!
 
One way might be to ensure that you have warnings for deletes turned on.

Check under Tools-->Options-->Edit/Find tab

In the "Confirm" section make sure that "Document Deletions" is checked.


Jamie
 
Sammy,

Try posting the code you think is causing the problem. Somebody may spot the
problem quickly and give you a solution. The only other thing that springs
to mind is if you have switched warnings off somewhere in your code and
haven't turned them back on. Look through your code for:

DoCmd.SetWarnings False

Wherever this code is used it is a good idea to turn it back on in the same
procedure (unless you actually want warnings off for some reason). To
switch them back on simply exchange "False" for "True".

See how you go, try to post some code for others to look at.

Jamie
 
How can I globally prevent
records from being deleted in this table?

Short of imposing Access security and removing Delete permissions from the
table, you can't.

A rigorous testing programme should show in what circumstances the records
are disappearing.

Final thought: are the records really being deleted or just failing to come
up in the query? Is there a problem with the WHERE criterion, for example?

All the best


Tim F
 
Back
Top