G
Guest
Hi all,
I need to have this code search multiple fields, but I keep getting
"Expected end of statement" on the Me in the second to last line:
If Not IsNull(Me.txtFilterMainName) Then
'strWhere = strWhere & "([MainName] Like ""*" & Me.txtFilterMainName
& "*"") AND "
strWhere = strWhere & "([Address1] Like ""*" & Me.txtFilterMainName
& "*"") OR " & _
strWhere = strWhere & " ([StreetName] Like "" * " &
Me.txtFilterMainName & " * "") Or "
strWhere = strWhere & "([From] Like "" * " Me.txtFilterMainName
& " * "") Or "
strWhere = strWhere & "([To] Like "" * " & Me.txtFilterMainName
& " * "") And "
End If
Thanks,
NickX
I need to have this code search multiple fields, but I keep getting
"Expected end of statement" on the Me in the second to last line:
If Not IsNull(Me.txtFilterMainName) Then
'strWhere = strWhere & "([MainName] Like ""*" & Me.txtFilterMainName
& "*"") AND "
strWhere = strWhere & "([Address1] Like ""*" & Me.txtFilterMainName
& "*"") OR " & _
strWhere = strWhere & " ([StreetName] Like "" * " &
Me.txtFilterMainName & " * "") Or "
strWhere = strWhere & "([From] Like "" * " Me.txtFilterMainName
& " * "") Or "
strWhere = strWhere & "([To] Like "" * " & Me.txtFilterMainName
& " * "") And "
End If
Thanks,
NickX