Results 1 to 10 of 10
  1. #1
    HelenWM is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    20

    Totaling Zip Codes


    I am working on a database for a Free Store at my church. We want to know how many members we serve from each zip code. I have a Member's table which includes zip codes. I am able to sort by zip code but cannot figure out how to get a count for the number of members in each zip code. Thanks for any help with this simple issue.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You want to do an Aggregate Query. Here's how:

    1. Create a new query based on your table
    2. Add the Zip code and any other field that is not blank (you could add the member ID field or the Zip Code field a second time)
    3. Click on the Totals icon (looks like a Sigma)
    4. This will add a Totals Row under each field. Leave the phrase "Group By" under the Zip Code field, but under your other field, change the Totals Row value to "Count".
    5. View your results.

  3. #3
    HelenWM is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    20

    Totaling Zip Codes

    Quote Originally Posted by JoeM View Post
    You want to do an Aggregate Query. Here's how:

    1. Create a new query based on your table
    2. Add the Zip code and any other field that is not blank (you could add the member ID field or the Zip Code field a second time)
    3. Click on the Totals icon (looks like a Sigma)
    4. This will add a Totals Row under each field. Leave the phrase "Group By" under the Zip Code field, but under your other field, change the Totals Row value to "Count".
    5. View your results.
    Thank you so much! Problem solved immediately!

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Great! Glad to help! Aggregate Queries are a great tool for doing counts, sums, mins, and maxes.

  5. #5
    HelenWM is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    20
    I have another question. Can you tell I am still learning!

    I am trying to find the number of clients who shopped per year. I have a Clients table and an Items Received table that shows what date each client received items. The dates are m/d/yyyy - 11/12/2015.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    In your Aggregate Query, add the following calculated field (where "DateField" is the actual field name of your date field):
    Code:
    CalcYear: Year([DateField])
    Now, if you "Group By" this field too, it will give you the counts for each Member/Year combination.

  7. #7
    HelenWM is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    20
    Feeling stupid!

    Where do I put the code: CalcYear: Year([DateRec])? Criterion? Where? Under Client or Items Rec in query? I am able to get by month but need for year.

  8. #8
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904

  9. #9
    HelenWM is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    20
    I really appreciate all you have done for me. I cannot thank you enough. The link above took care of something I have tried to figure out for a long time. Keep up the good work! Your patience with a Novice is commendable!

  10. #10
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome. And thank you for the kind words!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Totaling Columns
    By BethanyM in forum Queries
    Replies: 9
    Last Post: 09-11-2014, 11:23 AM
  2. Sub Totaling in a report
    By keiath in forum Reports
    Replies: 11
    Last Post: 04-04-2014, 06:28 AM
  3. Sub totaling in a query or report
    By n2mee in forum Queries
    Replies: 8
    Last Post: 11-16-2013, 03:55 PM
  4. Totaling on a report
    By eskybel in forum Access
    Replies: 9
    Last Post: 04-02-2013, 01:11 PM
  5. Totaling a value in group footer...
    By hodgy20 in forum Reports
    Replies: 0
    Last Post: 11-14-2008, 08:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums