On Current Lock Record if condition is true

  • Thread starter Thread starter Jen_p
  • Start date Start date
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
 
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")
 
Back
Top