Microsoft Access 2010 Bible

(Rick Simeone) #1

Part III: More-Advanced Access Techniques


660


FIGURE 18.18
A totals query grouped by product category

The recordset in Figure 18.18 has a single record for each type of product. The Group By field displays
one record for each product type, in alphabetical order. The query shown in Figure 18.18 is included in
the Chapter18.accdb database as qryProductAggregateFunctionsByCategory.

Calculating totals for several groups
You can perform group totals against multiple fields and multiple tables as easily as with a single
field in a single table. For example, you may want determine the sales of each product category.
This query requires information from tblProducts and tblSalesLineItems.

This query, shown in Figure 18.19, uses multiple tables and fields from each table. The query
results are shown in Figure 18.20.

FIGURE 18.19

An aggregate query involving multiple tables

Free download pdf