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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top