Access Syntax Error

shieldsco
shieldsco used Ask the Experts™
on
I'm getting a syntax error on the code line... any thoughts.

strFilter = "([EMPLASTNAME] &" "& [EMPfirstNAME] Like ""*" & [strSearch] & "*"")"

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
When using doublequotes inside a string, you need to double them (for the parser to understand you want a quote and don't intend to end the string.
So try
strFilter = "([EMPLASTNAME] &"" ""& [EMPfirstNAME] Like ""*"" & [strSearch] & ""*"")"

Open in new window

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial