It's not really security so much as good application design.
One problem I see a lot are forms that have all the records in the table
displayed. These usually show the first record in the recordset and an new
user can start typing in that record, effectively deleting the existing
information. They often do this without realizing it and it's the first
thing I check when I hear a database is "deleting records for no reason".
There are several solutions (there are always multiple solutions for almost
anything in Access).
One is to have two separate forms, the first for adding new records and a
second for editing existing records. You can set the default properties for
the forms (Allow Edits, Allow Additions, Allow Deletions, and Data Entry) in
various ways to achieve what you want. Open the add new form first and have
a button on it to open the editing form. Thus they have to deliberately
push a button to get to the other records. It doesn't stop them so much as
makes it harder to accidentally screw up.
You can also do something similar on a single form if you open it from
another form with the DoCmd.OpenForm command. For instance, if you open the
form with this command:
DoCmd.OpenForm "YourForm", , , , acFormAdd
this will open the form in the AddOnly mode
on this form, add a button with the following code:
Me.DataEntry = False
which will open it back up to seeing all the records.
You could also add code that will open the form to the New Record, which
will allow them to scroll up (or use the record navigation buttons) to go to
and edit previous records. But at least they'll start with an empty record.
To do this, add this code to the On Open event of the form:
DoCmd.GoToRecord , , acNewRec
There are other more complex methods, but these are the quickest and
easiest.
--
--Roger Carlson
MS Access MVP
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L