Queries - Multiple Exclusions

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

Guest

I have created a family and friends address and phone number list. I have 4
people named Hunter but I only want to list "Louise Hunter" in my family-only
list. I have two people named Anderson of which I only want "Jim Anderson"
on the list. Each person has a unique ID#. I'm working in queries under my
ID# column in Criteria and have used "not like" to remove one ID#, but adding
"or" to "not like" doesn't exclude the additional ID#s. How do I remove
multiple ID numbers? Additionally, to include only specific families, under
the LastName column in Criteria I have listed their last names using "or".
The query returns all the correct last names. Any suggestions on how to get
exclude the people that don't belong on the list?

(In Criteria and Using "not like" and first names from the FirstName column
works only if I use just one name, which is basically the same thing that is
happening in the ID# column.)
 
You might find it easier and more manageable to include another field in your
table which identifies the group they fall into then you can just query on
that field.

Sheila
www.c-i-m-s.com
 
You might use something like the following if your ID# fields is a number
field.
NOT IN (111,222,444,587)

If the field is text then you would need to add quote marks around each ID#
value.
NOT IN ("111","222","444","587")
 
It worked!!!!! Thanks a million, I've been struggling with this for two
days--and putting quotation marks around each number, no parenthesis, and
used NOT LIKE. I wasn't even close. Thanks so much for your help!
 
Back
Top