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?
fredg - 13 Nov 2007 20:12 GMT
> 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
[quoted text clipped - 4 lines]
> 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".

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jason Lepack - 13 Nov 2007 20:14 GMT
Unless you use LIKE then it intereprets "*STRING*" as literally
"*STRING*"
> 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
[quoted text clipped - 4 lines]
> MaineCalc".
> Anyone know what I'm doing wrong?