Syntax error in Filter

Petros

Registered User.
Local time
Today, 22:21
Joined
Jun 30, 2010
Messages
145
Hi all, sorry for bothering again..

I recieve a syntax error "sometimes" :) when i save the form that holds this filter )while developing)

Private Sub Command80_Click()
Me.Filter = "[Assigned] like '*" & "EU" & "*'"
Me.FilterOn = True
End Sub

Why?..also..will this sub function once i uppgrade to SQL?

Thanks!
 
the '*' symbol does not need concatenation, necessarily. single quotes might not do it either. vba hates them.maybe try:
Code:
 "[Assigned] like " & """" & "*" & """" & "EU" & """" & "*" & """"
or maybe:
Code:
 "[Assigned] like '*'" & "EU" & "'*'"
migth be tricky.

couples suggestions for you.
 
Thank you, much appriciated..i iwll play around with your suggestions.
 

Users who are viewing this thread

Back
Top Bottom