Locking individual records

  • Thread starter Thread starter Eddie Ramirez
  • Start date Start date
E

Eddie Ramirez

Hi!

How can i lock a record so that the common user cannot alter its
contents after a comman button has been pressed.

Example: I have engineers typing up information in to a record and when
they
are done i want them to click on a command button to save it and also lock
that record down (can be viewed but not edited) without me releasing it
again.

Thanks!

Eddie
 
you could add an additional field to the table, as

RecordLocked Yes/No data type

in the data entry form's command button code, add the following line of code
before the Save command, as

Me!RecordLocked = True

in the form's Current event procedure, add the following code, as

Me.AllowAdditions = Not Nz(Me!RecordLocked, False)

the above line of code acts as a toggle; when RecordLocked = True, then
AllowAdditions is set to False, and vice versa.

set up your own "release" action however it suits you, using

Me!RecordLocked = False

hth
 
Back
Top