Hi,
A form's open event has run the following code successfully for years:
Private Sub Form_Open(Cancel As Integer)
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 31 Then
DoCmd.RunMacro "Blah Blah Filter"
Else: DoCmd.RunMacro "Dog"
End If
End Sub
However, we now need to add a second level of 66 to run the macro "Blah Blah Filter"
We've tried the following, but it runs "Dog" for both levels, and any others:
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 31 Then
DoCmd.RunMacro "Blah Blah Filter"
End If
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 66 Then
DoCmd.RunMacro "Blah Blah Filter"
Else: DoCmd.RunMacro "Dog"
End If
End Sub
We've also tried changing = 31 to = (31,66) which doesn't work.
Your solution is greatly appreciated.
Thanks you!!
A form's open event has run the following code successfully for years:
Private Sub Form_Open(Cancel As Integer)
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 31 Then
DoCmd.RunMacro "Blah Blah Filter"
Else: DoCmd.RunMacro "Dog"
End If
End Sub
However, we now need to add a second level of 66 to run the macro "Blah Blah Filter"
We've tried the following, but it runs "Dog" for both levels, and any others:
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 31 Then
DoCmd.RunMacro "Blah Blah Filter"
End If
If DLookup("Level", "USERS", "[USER ID] = '" & CurrentUser & "'") = 66 Then
DoCmd.RunMacro "Blah Blah Filter"
Else: DoCmd.RunMacro "Dog"
End If
End Sub
We've also tried changing = 31 to = (31,66) which doesn't work.
Your solution is greatly appreciated.
Thanks you!!