"And" & "Or" criteria for the same field

CRISTOS
NewLounger
Posts: 22
Joined: 23 Nov 2018, 20:24

"And" & "Or" criteria for the same field

Post by CRISTOS »

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!

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: "And" & "Or" criteria for the same field

Post by HansV »

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 [.
Best wishes,
Hans

CRISTOS
NewLounger
Posts: 22
Joined: 23 Nov 2018, 20:24

Re: "And" & "Or" criteria for the same field

Post by CRISTOS »

Thank you!