Hello,
I have the following criteria:
Like "*abc*" or Like "*[y*" for the same field. I need to add ---- And Like "/88*"
When I add the "And" part, it doesn't work.
Please advise.
Thank you!
"And" & "Or" criteria for the same field
-
- NewLounger
- Posts: 22
- Joined: 23 Nov 2018, 20:24
-
- Administrator
- Posts: 78236
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: "And" & "Or" criteria for the same field
Use the following expression in the Criteria row:
(Like "*abc*" Or Like "*[[]y*") And Like "/88*"
Since And has precedence above Or, you need parentheses around the first two conditions.
And since [ has a special meaning in Like criteria, you must use enclose it in [ ] to specify the literal character [.
(Like "*abc*" Or Like "*[[]y*") And Like "/88*"
Since And has precedence above Or, you need parentheses around the first two conditions.
And since [ has a special meaning in Like criteria, you must use enclose it in [ ] to specify the literal character [.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 22
- Joined: 23 Nov 2018, 20:24
Re: "And" & "Or" criteria for the same field
Thank you!