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:

Professional Opinions
Ask a Question
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

troubleshooting Question

Lock Controls

Avatar of mato01
mato01Flag for United States of America asked on
Microsoft Access
9 Comments1 Solution1019 ViewsLast Modified:
I am trying to lock fields based on a selection from a drop down box.  I created a table, where I tagged the fields I want locked based on the selection. The code locks the fields, it just won't unlock the fields.

This portion does not work.  Is this the wrong syntax?
If mycheck3 Like "" Then
   Me.AllowEdits = True

Any thoughts are appreciated.  Thanks
Dim mycheck3, MyDB1 As Database, MYDBR1 As Recordset
Set MyDB1 = CurrentDb
Set MyDB1 = DBEngine.Workspaces(0).Databases(0)
Set MYDBR1 = MyDB1.OpenRecordset("test_field_locks", DB_OPEN_DYNASET)
    mycheck3 = MYDBR1("Adj_Lock").Value
        If Me.Status = "Submitted" Then
            If mycheck3 Like "LS" Then
                Me.AllowEdits = False
            If mycheck3 Like "" Then
                Me.AllowEdits = True
            End If
         End If
    End If
Avatar of mato01
mato01Flag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answers