R
Rick
I need to apply a filter where only records with a particular UserID are
displayed. I have a combo box called FindUser and a refresh button. When
the button is clicked, several things happen but the one I am having trouble
with is the userid filter. The field in my query and on my continuous form
is 'UserID'
Can you tell me what I am doing wrong in my syntax:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , "userID = [FindUser]"
End If
I have also tried:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , "userID = me.FindUser"
End If
and:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , userID = FindUser
End If
displayed. I have a combo box called FindUser and a refresh button. When
the button is clicked, several things happen but the one I am having trouble
with is the userid filter. The field in my query and on my continuous form
is 'UserID'
Can you tell me what I am doing wrong in my syntax:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , "userID = [FindUser]"
End If
I have also tried:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , "userID = me.FindUser"
End If
and:
If Not [FindUser] = "" Then
DoCmd.ApplyFilter , userID = FindUser
End If