Multiple AND criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to run a query that pulls in records without certain states
(approx. 20 of them) anywhere in a field's text. I set up the criteria as

<>"*Maine*"and<>"*New Hampshire*"and<>"*Rhode Island*"

This is still returning records with the states in them - for example "EC
MaineCalc".
Anyone know what I'm doing wrong?
 
I'm trying to run a query that pulls in records without certain states
(approx. 20 of them) anywhere in a field's text. I set up the criteria as

<>"*Maine*"and<>"*New Hampshire*"and<>"*Rhode Island*"

This is still returning records with the states in them - for example "EC
MaineCalc".
Anyone know what I'm doing wrong?

When you use the wildcard * you must also use the Like keyword.
Like "*Maine*"
since you do not want Maine, then it's Not Like:

Not Like "*Maine* and Not Like "*New Hampshire* and Not Like etc....

You'll need to be careful with a state such as Virginia, as Virginia
is included within "West Virginia".
 
Back
Top