Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Mar 2006
    Kitchener, Ontario, Canada
    Thanked 0 Times in 0 Posts

    Count function (2003)

    I always trip over what seems to be a simple expression. I want to count records by a number of criteria: postal code, city, county.
    How do I set up the query to just count the records? I've put all the data into one table using a make table query and I just need to count these records.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Count function (2003)

    You can use a totals query for this. You turn an ordinary select query into a totals query by selecting View | Totals or by clicking the Totals button on the toolbar (the button with the Greek letter Sigma). This will add a Total row to the query grid. By default, the Total option will be set to Group By for all fields, but you can select other options from the dropdown list, such as Sum, Average, Count, etc.
    For example if you want to count the number of records per city, you add the City field to the query grid (leaving the Total option as it is: Group By), and an ID field (or almost any field) for which you set the Total option to Count.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts