Link to home
Start Free TrialLog in
Avatar of thandel
thandel

asked on

Unable to get search criteria to work

Have been using the following code with perfect results:

GCriteria = "OptA" & " LIKE '*" & FindRecText & "*'" & " OR OptB" & " LIKE '*" & FindRecText & "*'"
Form_FEntryQuery.RecordSource = "select * from tObj where " & GCriteria & ""

But now I would like to add "OptC" along with OptA for either to be found.  Ex:

GCriteria = "OptA" & " Or " & "OptAC" & " LIKE '*" & FindRecText & "*'" & " OR
OptAB" & " LIKE '*" & FindRecText & "*'"

My results are not finding the correct records... what am I doing wrong with my syntax?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
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
Avatar of thandel
thandel

ASKER

Thanks Pat!
You're welcome :)