On Current Lock Record if condition is true

J

Jen_p

Hello -
Is there a way I can put in an "on current" event that
when a value in a combo box is true, then lock the entire
record. I need it so if my "approved" field is "no",
then the entire record remains unlocked. If the value
is "yes", then the entire record needs to be locked so
that they cannot change or edit any field or delete the
record.

Thanks!
Jenni
 
M

Marshall Barton

Jen_p said:
Is there a way I can put in an "on current" event that
when a value in a combo box is true, then lock the entire
record. I need it so if my "approved" field is "no",
then the entire record remains unlocked. If the value
is "yes", then the entire record needs to be locked so
that they cannot change or edit any field or delete the
record.


Just set the form's AllowEdits property according to the
combo box value:

Me.AllowEdits = (Me.combo = "No")
 
Top