Link to home
Start Free TrialLog in
Avatar of sfn149
sfn149Flag for United States of America

asked on

Me.Filter Query question

What am I doing wrong with the strFilter portion of this code.  I get the attached error everytime.
I am trying to filter the records to only get records with LIKE results in the column called Description.  In the test I was looking for the word GOD.

strFilter = "Description LIKE '" & strSearch '"
Me.Filter = strFilter
Me.FilterOn = True
 User generated image User generated image
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Try this:

strFilter = "[Description] = " & Chr(34)  & strSearch & Chr(34)
Me.Filter = strFilter
Me.FilterOn = True

mx
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial