To get round this issue I know replace the @ in my sql string with CHAR(64), its a bit messy but works for me.
if InStr(1, strSQL, "Like N'@%") > 1 Then
strSQL = Replace(strSQL, "Like N'@%", "LIKE CHAR(64) + N'%")
Else
strSQL = Replace(strSQL, "@", "'+ CHAR(64)+ N'")
End If
I have a made a DIY QBF form that works fine, some of the items search for contain wildcard characters like % with I deal with by a small bit code that puts [ ] around the characters, then I build the SQl String for the record source of the form.
If the @ symbol is being searched for Access...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.