This must be simple "OR" I am
The following code I am trying to disable or lock a control depending on the value of a combo box
This works fine with one value BUT I want to lock Control4 with values 3 or 4
I have had the lines as
If Me.SupplyToFK = "3" OR "4" Then
If Me.Combo1 = "3" OR "4" Then
but it just don't work
Private Sub Combo1_AfterUpdate()
Me!Combo2.Requery
If Me.SupplyToFK = "3" Then
Me.Control4.Locked = True 'User not allowed access
Else
Me.Control4.Locked = False
End If
End Sub
Private Sub Control4_Enter()
If Me.Combo1 = "3" Then
MsgBox ("Go Away'), vbOKOnly, "Entry Disallowed"
Else
End If
End Sub
help
The following code I am trying to disable or lock a control depending on the value of a combo box
This works fine with one value BUT I want to lock Control4 with values 3 or 4
I have had the lines as
If Me.SupplyToFK = "3" OR "4" Then
If Me.Combo1 = "3" OR "4" Then
but it just don't work
Private Sub Combo1_AfterUpdate()
Me!Combo2.Requery
If Me.SupplyToFK = "3" Then
Me.Control4.Locked = True 'User not allowed access
Else
Me.Control4.Locked = False
End If
End Sub
Private Sub Control4_Enter()
If Me.Combo1 = "3" Then
MsgBox ("Go Away'), vbOKOnly, "Entry Disallowed"
Else
End If
End Sub
help