Microsoft Access 2010 Bible

(Rick Simeone) #1

Part III: More-Advanced Access Techniques


654


products purchased by customers in particular states. Performing each of these examples as a
query results in a recordset based on the mathematical calculations you requested.

Cross-Reference
You have already worked with counts using the Count (*) function in the previous section.


To create a totals query, you use a new row in the Query by Example (QBE) pane — the Total row.
The following section describes this handy tool in detail.

Showing and hiding the Total row in the QBE pane
To create a totals query, create a select query and then display the Total row of the QBE pane. You
open the Total row by clicking on the Totals button in the Show/Hide group on the Design tab
while a query is open in the Query Designer.

If the Table row is not present on your screen, open it by clicking the Table Names button in the
Show/Hide group on the Design ribbon tab.

The Total row options
You can perform total calculations on all records or groups of records in one or more tables. To
perform a calculation, you must select one of the options from the drop-down list in the Total row
for every field you include in the query, including any hidden fields (with the Show option turned
off). Figure 18.14 shows the drop-down list box opened in the Total row of the ProductID field.

Note
The query in Figure 18.14 is not included in the Chapter18.accdb example database.


FIGURE 18.14

The drop-down list box of the Total row

Free download pdf