Prevent records from deleting

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!
 
J

Jamie Richards

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
 
J

Jamie Richards

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
 
T

Tim Ferguson

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
 

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