Enter criteria to affect when calculations are performed (MDB)

Microsoft Office Access 2003

  • Specify the criteria in the Group By fields as the following example shows.

    Limit groups of records before performing a calculation on them

    Callout 1 This query totals extended prices for ...

    Callout 2 ... companies in Canada and the UK only.

Show Return selected results after calculations are performed

  • Specify criteria in the field that contains the calculation as the following example shows.

    Perform a calculation and then return the selected results

    Callout 1 This query totals extended prices for companies in Canada and the UK ...

    Callout 2 ... but shows only those that are less than $10,000.

Show Limit records before they are grouped and before the calculation is performed

  • Add to the design grid the field whose records you want to limit, and then specify criteria in the field's Criteria cell.

    If you're calculating totals in the same query, set the Total cell for the field containing the criteria to Where. This rule applies whether you're calculating the total on all records or groups of records. (Microsoft Access automatically clears the Show check box.)

    The following example uses the ExtendedPrice field twice, once to limit the records and once to calculate the total. However, you can use a different field to limit records by dragging that field to the design grid and setting its Total cell to Where.

    Limit records before grouping and calculating

    Callout 1 From these records, the query retrieves only those with extended prices greater than $500.00 before it groups or totals ...

    Callout 2 ... and then it sums and shows only those totals for companies in Canada or the UK.

    Callout 3 This total for Seven Seas Imports does not include the order for $210.00.