Preventing deletion of records

K

Krista

This may not be a simple-answer question, but...what is
the best method for keeping a user from deleting records
in a database? If this is a question best answered by my
reading an article or book, could you please recommend.
Thank you!
 
K

Ken Snell [MVP]

Depends upon how your user is able to gain "access" to your records. Tell us
more about your setup and what you're trying to prevent.
 
K

Krista

It's a very simple database---one table, one form for
data entry, 3 reports based on some easy queries. The
records are dated tickler entries. Currently the user
opens the entire .mdb file (there's no exclusive front
end or .mde setup or switchboard), has access to all
tables/queries/etc. She is supposed to just open the
form, either make changes or additions, print reports,
then get out. But records keep disappearing. I removed
the delete buttons from the form screen and the delete
option from the pulldown menu but of course she can still
go into the table and do a highlight/delete. So basically
I'd like to "remove her right" to delete anything.

Does that explanation help? (I will also read the article
that Joe recommended). Thanks.
 
K

Ken Snell [MVP]

Joe has properly pointed to the built-in ACCESS security, but note his
admonition about being complicated....it is.

So long as you let the user have access to the tables, etc. and the user
must make edits/changes, the only other way to "block" this (though not
foolproof) is to build forms for the user to use, make the database window
"invisible" (Tools | Startup Options), and control what is done via the
forms. But the user can bypass all that by holding the Shift key down when
opening the database. There is a way to lock this out too using VBA code,
but it's possible to run a second set of VBA code to remove that protection
too.

Otherwise, if you can't educate the user, only let the user have "read-only"
access on the file, or else block the user from using the database!
 
K

Krista

Thanks. I think I will read the article fwded by Joe and
play with security on my own as a learning
experience...but in this case, with my level of
expertise, your suggestion below is what I was looking
for. This is not a user who will be interested in
figuring out how to bypass startup, so we should be set.

Much obliged, guys!
 
Top