Protect records from changing or deleting

  • Thread starter Thread starter Mike
  • Start date Start date
This should be done through the forms you use to update
the table. Set the form's "On Current" event to [Event
Procedure]. Then in the code for the event procedure
check the record for the conditions which indicate that it
is a record that you do not want edited or deleted. Then,
set the Form.AllowEdits and Form.AllowDeletions to False,
otherwise set these values to True.
 
If you are viewing your records through a form you can follow these steps.
1.Click on "View" ,select "Design View
2.On the record you do not want to be changed,right click and select "Properties
3.Click on "All" tab (Top right
4.Scroll down and select "Locked"
5.Change to "True

If you are viewing your records through a table you can follow these steps.
1.Click on "View" ,select "Design View
2.Select the field you do not want to be changed
3.At the bottom a option stating "Allow Edits" is available
4.Select "False
 
You might try something like this:

1. In your existing table, create one new unique index that includes all
the fields.

2. Create a new table that is a copy of the structure of your existing
table.

3. Create a new 1:1 relationship with enforced referential integrity (but
without cascading updates or deletes) from your existing table to the new
table that includes all the fields.

4. Copy records from your existing table to the new table when you don't
want them to be updated or deleted.

5. Optionally secure your database and restrict permissions on the new
table to prevent records from being inserted, updated or deleted (which
controls if related records in your existing table may be updated or
deleted) and prevents the design of tables from being changed except by the
users or groups you want.

Another approach would be to secure your database and preventing direct
access to your existing table except by forms, queries, and code that
enforce your rules about which records may be updated or deleted.
 
Back
Top