We help IT Professionals succeed at work.
Get Started

How lock form with checkbox but be able to unlock the form with the same checkbox

SteveL13 asked
Last Modified: 2016-01-27
I have a checkbox on a form labeled "Lock Record".  The user will use this checkbox to lock the data on the form so users can't change anything.  I'm trying the following code  which doesn't work because obviously the checkbox is locked so the user can't UNlock the data which they need to be able to do.  There must be a better way/

    If Me.chkbxFormLocked = True Then
        Me.AllowAdditions = False
        Me.AllowDeletions = False
        Me.AllowEdits = False
        Me.cmdAddRecord.Enabled = False
        Me.chkbxFormLocked.Enabled = True
    End If
Watch Question
Top Expert 2016
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE