Part I: Access Building Blocks
364
FIGURE 9.34
The Group, Sort, and Total area completed
With A on Top button
Adds a group Adds a sort
Although in this example you used a field, you can also sort (and group) with an expression. To
enter an expression, click the Add a Sort or Add a Group button in the Group, Sort, and Total
area and click the Expression button at the bottom of the field list. The Expression Builder dialog
box opens, enabling you to enter any valid Access expression, such as in = [RetailPrice]-[Cost].
To change the sort order for fields in the Field/Expression column, simply click the drop-down
arrow to the right of the With A on Top button (see Figure 9.34) to display the Sort Order list.
Select Descending from the sort options that appear.
Removing a group header or footer
To remove a group header or footer, display the Group, Sort, and Total area, select the group or
sort specifier to delete, and press the Delete key. Any controls in the group header or footer will be
removed.
Hiding a section
Access also enables you to hide headers and footers so that you can break data into groups without
having to view information about the group itself. You can also hide the Detail section so that you
see only a summary report. To hide a section, follow these steps:
- Click the section you want to hide.
- Display the section’s Property Sheet.
- Click the Visible property and select No from the drop-down list in the property’s
text box.
Note
Sections are not the only objects in a report that can be hidden; controls also have a Visible property. This
property can be useful for expressions that trigger other expressions.