Query critieria to exclude 2 words

  • Thread starter Pasadena-D via AccessMonster.com
  • Start date
P

Pasadena-D via AccessMonster.com

Hello,

I have a query that I want to run to pull data, but I want it to exclude
"Complete" and "Approved" in the Status field, and return everything else
except those 2 words. I have tried several different ways to do it, but I can
only get it to exclude one or the other. I'm using this right now:

Not Like "Complete" AND "Approved"

This only gives me Approved, which I don't want. Please help!
 
J

Jeff Boyce

I believe you want those records that don't have "Complete" and those that
don't have "Approved"

First, if the ONLY value stored in that status field is a single word (e.g.,
"Complete", "Approved", ... ?"Pending", ...), you do not need to use the
"Like" condition. You could use something similar to (untested):

Not "Complete" and Not "Approved"

You are leaving out the "not" for the second condition.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
P

Pasadena-D via AccessMonster.com

Jeff,

It works great! Thanks for your help.

Jeff said:
I believe you want those records that don't have "Complete" and those that
don't have "Approved"

First, if the ONLY value stored in that status field is a single word (e.g.,
"Complete", "Approved", ... ?"Pending", ...), you do not need to use the
"Like" condition. You could use something similar to (untested):

Not "Complete" and Not "Approved"

You are leaving out the "not" for the second condition.

Regards

Jeff Boyce
Microsoft Access MVP
[quoted text clipped - 7 lines]
This only gives me Approved, which I don't want. Please help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top