Calculate a sum, average, count, or other total on all the records in a query

Calculate a sum, average, count, or other total on all the records in a query

  1. Create a select query in Design view. Add the tables whose records you want to use in the calculation, and then add the fields on which you want to perform calculations and specify criteria.

  2. Click Totals on the toolbar.

    Microsoft Access displays the Total row in the design grid.

  3. For each field in the design grid, click its cell in the Total row, and then click one of the following aggregate functions: Sum, Avg, Min, Max, Count, StDev, or Var.

    Select aggregate functions in the Total row

    For information on each aggregate function, click . (For special considerations when using the First and Last functions, click

  4. If you want, enter criteria to affect the results of the calculation.

    How?

  5. If you want, sort the results.

    How?

  6. Click View on the toolbar to view the results.

If you didn't get the results you expected, click .

Notes