Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 200 querry question

Status
Not open for further replies.

jpeasemiller

Technical User
Feb 22, 2002
14
US
I want to exclude certain cities from an access mailing. I will do a mail merge with Word.

How can I exclude certain cities, and or zipcodes in my query and then save results as my database mail merge source?

Not sure of how to show it in the Query window.....Looks like using the word NOT might exclude certain criteria from my findings. Is this true?
 
Hard to say without seeing the table structure but start with something like

Where City NOT IN ('Chicago', 'LA', 'Cleveland')

 
Try building the query that you want in a query builder in access 200(wow, I wonder if this version can handle such a request). Run the query, then on the toolbar at the top change it from datasheet view to SQL view to get the appropriate SQL statement. Hasn't failed me yet!!!!

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmm
 
I just want to know the syntax for excluding certain cities and or zipcodes in a Access 2000 query. My fields are named CITY and ZIP Codes.

Or could I just exclude them in a sort or filter?

Then I want to save the results in a new database so that I can do a mailing with Word 2000.
 
You can also produce the kind of SQL Golom gave you by typing on the criteria line of the query design grid:

Not Like "Albany" And Not Like "Rochester" And Not Like "Syracuse" or

<>&quot;Albany&quot; And <>&quot;Rochester&quot; And <>&quot;Syracuse&quot;

(Add as many as you need.)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top