Access Query Question

WHERE Len([cell]) < 10 OR Len([work]) > 10 & contains x;


I need work to show is it is > 10 and contains x
LVL 3
Computer GuyAsked:
Who is Participating?
 
PatHartmanCommented:
WHERE (Len([cell]) < 10 OR Len([work]) > 10) AND SomeField Like "*" & "x"  & "*";

You were confusing the concatenation operator "&" with the relational operator "AND".  In your mind try to separate building the string from what the string should contain.  It will help you with syntax.
0
 
hnasrCommented:
It depends on the required result:
One way as previous comment: ( ) AND ()

Other way: ( ) OR () like:

WHERE (Len([cell]) < 10) OR ((Len([work]) > 10) AND ([work] Like "*" & "x" & "*"))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.