Protecting a record

  • Thread starter Thread starter Ansley Cliff
  • Start date Start date
A

Ansley Cliff

I have a form which data is entered into. At a point the
records information is complete and a check box is
checked. At this time when the complete box is checked,
is there a way for the recored to be locked, or protected
so that record cannot be edited? Thanks, Ansley Cliff
 
Ansley said:
I have a form which data is entered into. At a point the
records information is complete and a check box is
checked. At this time when the complete box is checked,
is there a way for the recored to be locked, or protected
so that record cannot be edited? Thanks, Ansley Cliff


Use the form's Current event to do this:

Me.AllowEdits = Not Me.thecheckbox
Me.AllowDeletetions = Not Me.thecheckbox
 
put the following code in a procedure in the checkbox's On Click event:

Me.AllowEdits = False

then put the following code in a procedure in the form's On Current event:

Me.AllowEdits = Nz(Not (Me.Check1 = True), True)

note, the checkbox has to be bound to a field in the underlying table. also,
once you put a check in the box for a particular record, you won't be able
to uncheck the box from within the form.

hth
 
Back
Top