forms and records locking

  • Thread starter Thread starter nikos a via AccessMonster.com
  • Start date Start date
N

nikos a via AccessMonster.com

I update the table through a form.
Each page in the form updates one complete row of the table.

I am trying to find a method to block each row of the table (or equivalenty
each record in the form) after completing the entry in order to prevent
unwanted deletion or alteration of the entries of this record in the future.
Is this possible?
 
nikos said:
I update the table through a form.
Each page in the form updates one complete row of the table.

I am trying to find a method to block each row of the table (or
equivalenty each record in the form) after completing the entry in
order to prevent unwanted deletion or alteration of the entries of
this record in the future. Is this possible?

If you set form properties...

AllowAdditions = Yes
AllowDeletions = No
AllowEdits = No

Note that the last even affects unbound controls which is sometimes not
desirable. In that case you would loop through all of the controls in the
Current event of the form and set their Locked property to True instead
(skipping the unbound ones).
 
Nikos

Are you saying that you want to prevent changes to a row after all data has
been entered? Do you have a mechanism for permitting corrections if
something was incorrectly entered? Do you have a way in mind to allow
partial data entry, then return at a later date/time to complete the "row"?

One approach might be to add a Yes/No field to the table (e.g.,
"Completed"). You would add a bit of code to your <Save> command button on
your form to mark the row as Completed. The query you use to fill the form
would exclude the records marked "Completed".

Note that this wouldn't prevent someone from inspecting the table directly
and making changes.

If you need to do that, too, you might have to resort to using Access
security -- this is a fairly complex undertaking.

Regards

Jeff Boyce
<Access MVP>
 
Back
Top