A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Zip Code Count



 
 
Thread Tools Display Modes
  #1  
Old October 6th, 2005, 03:57 PM
Glenn Dulmage
external usenet poster
 
Posts: n/a
Default Zip Code Count

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


  #2  
Old October 6th, 2005, 06:47 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Thu, 6 Oct 2005 10:57:43 -0400, "Glenn Dulmage"
wrote:

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]
  #3  
Old October 6th, 2005, 08:42 PM
Glenn Dulmage
external usenet poster
 
Posts: n/a
Default

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 Vinson" wrote in message
...
On Thu, 6 Oct 2005 10:57:43 -0400, "Glenn Dulmage"
wrote:

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]



  #4  
Old October 6th, 2005, 11:28 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Thu, 6 Oct 2005 15:42:54 -0400, "Glenn Dulmage"
wrote:

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]
  #5  
Old October 7th, 2005, 01:12 PM
Glenn Dulmage
external usenet poster
 
Posts: n/a
Default

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"
Newsgroups: microsoft.public.access.queries
Sent: Thursday, October 06, 2005 6:28 PM
Subject: Zip Code Count


On Thu, 6 Oct 2005 15:42:54 -0400, "Glenn Dulmage"
wrote:

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]



  #6  
Old October 7th, 2005, 09:17 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 7 Oct 2005 08:12:26 -0400, "Glenn Dulmage"
wrote:

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]
  #7  
Old October 9th, 2005, 08:41 PM
Glenn Dulmage
external usenet poster
 
Posts: n/a
Default

Wow! Worked like a charm.

Thanks,

Glenn

"John Vinson" wrote in message
...
On Fri, 7 Oct 2005 08:12:26 -0400, "Glenn Dulmage"
wrote:

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]



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can receive email but cannot send it. pegasus General Discussion 175 April 27th, 2010 05:49 PM
Count Code Help Needed, Please Dave Elliott Using Forms 4 April 29th, 2005 07:34 PM
Conversion SVC Worksheet Functions 9 February 28th, 2005 02:29 PM
Conversion of excel vba code to access vba filnigeria General Discussion 5 July 15th, 2004 02:23 AM
Expression - calculating running total Kathy Running & Setting Up Queries 26 June 22nd, 2004 10:14 PM


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.