List and count zip codes

J

John Barnes

I have a ZipCode field and would like to list, and count, every zip code that
user has entered. How would I do that? I know how to create a field that
counts the number of times user has entered a specific zip code, but how can
I display a list of every code entered and the number of times it has been
entered?
 
J

John Spencer

SELECT ZipCode, Count(ZipCode) as CountEntries
FROM YourTable
GROUP BY ZipCode

In design view of a query.
-- Add your table
-- Add the ZipCode field TWICE
-- SELECT View: Totals from the menu
-- Change Group By to Count under ONE of the ZipCode fields.
-- Run the query

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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

Top