Zip Code Count

  • Thread starter Thread starter Glenn Dulmage
  • Start date Start date
G

Glenn Dulmage

I want to make a count of 5 Zip codes from a small database of about 3,000 records.

How do I do this (i.e. what sort of query, what grouping and counting)?

--
Glenn T. Dulmage
207 Valley Road
Chestertown MD 21620
410-778-5166
(e-mail address removed)
 
I want to make a count of 5 Zip codes from a small database of about 3,000 records.

How do I do this (i.e. what sort of query, what grouping and counting)?

Use a query which does what you want.

Since you seem to know what you want, but have not clearly stated it,
it's a bit hard to say! What do you mean by "count of 5 zip codes"? Do
you mean to select five particular zip codes out of others in the
table and count the total number of records in that set, or do you
mean a count of records in each zip code, or what?

John W. Vinson[MVP]
 
John,

Thanks for the reply. What I mean "a count of 5 Zip codes" is 5 zip codes
out of perhaps several hundred. I need to supply this information to the
local Post Office every time a mass mailing is sent by a local non-profit
organization (not asking for money :) ).
 
John,

Thanks for the reply. What I mean "a count of 5 Zip codes" is 5 zip codes
out of perhaps several hundred. I need to supply this information to the
local Post Office every time a mass mailing is sent by a local non-profit
organization (not asking for money :) ).


Ok... I'll assume you have a table named Mailings with a primary key
MailingID and a field Zip (adjust these names to match your own
table).

Create a query by adding Mailings to the query grid; select MailingID
and Zip. Click the Greek Sigma icon (looks like a sideways W) to make
it a Totals query. Change the default Group By operator on MailingID
to Count, and to Where on Zip. On the Criteria line under Zip type

IN("48823", "72712", "02338", "83660", "98023")

to find some of my former residences (or your own preferred codes...)
Add any other needed criteria similarly using the Where operator.

Open the query and you should see a single record with the count of
records.

John W. Vinson[MVP]
 
Perhaps I'm doing something wrong. What I get is a single record of a total
count of all the 5 zip codes (CountofZip 284). What I need is the count of
each zip code.

Field Count
21620 218
21661 44
21644 12
23265 8
22547 2

Is there a way to do this. Or can I do a Report based on this query which
Groups By the zip and will give a count?

Thanks

----- Original Message -----
From: "John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com>
Newsgroups: microsoft.public.access.queries
Sent: Thursday, October 06, 2005 6:28 PM
Subject: Re: Zip Code Count
 
Perhaps I'm doing something wrong. What I get is a single record of a total
count of all the 5 zip codes (CountofZip 284). What I need is the count of
each zip code.

Thank you for saying this. "A count of 5 zip codes" - which you asked
for previously - is ambiguous. It could mean five separate counts or
one count. I guessed which you meant, and guessed wrong.
Field Count
21620 218
21661 44
21644 12
23265 8
22547 2

Is there a way to do this. Or can I do a Report based on this query which
Groups By the zip and will give a count?

Select the Zip field a second time in the query, and leave the default
Group By set on it.

John W. Vinson[MVP]
 
Wow! Worked like a charm.

Thanks,

Glenn

John Vinson said:
Thank you for saying this. "A count of 5 zip codes" - which you asked
for previously - is ambiguous. It could mean five separate counts or
one count. I guessed which you meant, and guessed wrong.


Select the Zip field a second time in the query, and leave the default
Group By set on it.

John W. Vinson[MVP]
 

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

Similar Threads

Update Query? 4
Query to capture AOL accounts 2
Update Query 6
Table design 6
Auto-Fill Addresses 2
Count the number of occurennces of Zip Code 2
Auto Complete in WinMail 2
Remember Password 5

Back
Top