Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Queries - Multiple Exclusions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Smedstad - 10 Jul 2006 15:33 GMT
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.)
Sheila D - 10 Jul 2006 16:34 GMT
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

>  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
[quoted text clipped - 10 lines]
> works only if I use just one name, which is basically the same thing that is
> happening in the ID# column.)
John Spencer - 10 Jul 2006 17:57 GMT
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")

> I have created a family and friends address and phone number list.  I have
> 4
[quoted text clipped - 19 lines]
> is
> happening in the ID# column.)
Smedstad - 11 Jul 2006 01:37 GMT
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!

> You might use something like the following if your ID# fields is a number
> field.
[quoted text clipped - 27 lines]
> > is
> > happening in the ID# column.)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.