Sort the records in this table so they are grouped by the value in the classification field

If you have an existing report and you want to add sorting or grouping to it, or if you want to modify the report's existing sorting or grouping, this section helps you get started.

You can perform simple sorting, grouping and totaling operations by right-clicking fields in Layout view and then choosing the operation you want from the shortcut menu. To switch to Layout view, right-click the report in the Navigation Pane and then click Layout view.

Note:  Although the instructions in this section don't use the Group, Sort, and Total pane directly, it is a good idea to open the pane and observe how it changes as you work. You will get a better idea of what Access is doing and, as you get more comfortable working with the Group, Sort, and Total pane, you can use it to make additional adjustments to your report. To display the Group, Sort, and Total pane:

  • On the Design tab, in the Grouping & Totals group, click Group & Sort.

  • Right-click any value in the field on which you want to sort.

  • On the shortcut menu, click the sort option you want. For example, to sort a text field in ascending order, click Sort A to Z. To sort a numeric field in descending order, click Sort Largest to Smallest.

Access sorts the report as you specified. If the Group, Sort, and Total pane is open, you can see that a new Sort by line for the field has been added.

Note:  When you apply sorting by right-clicking a field in Layout view, you can only sort one field at a time. Applying sorting to another field removes the sorting on the first field. This differs from the sorting behavior in forms, where multiple sort orders can be established by right-clicking each field in turn and the choosing the sort order you want. To create multiple sorting levels, see the section Add grouping, sorting, and totals by using the Group, Sort, and Total pane.

  • Right-click any value in the field on which you want to group.

  • On the shortcut menu, click Group On.

Access adds the grouping level and creates a group header for it. If the Group, Sort, and Total pane is open, you can see that a new Group on line for the field is added.

This option lets you calculate a sum, average, count, or other aggregate for a field. A grand total is added to the end of the report, and group totals are added to any groups that exist on the report.

  • Right-click any value in the field that you want to total.

  • Click Total.

  • Click the operation you would like to perform: Sum, Average, Count Records (to count all records), Count Values (to count only the records with a value in this field), Max, Min, Standard Deviation, or Variance.

Access adds a calculated text box control to the report footer, which creates a grand total. Also, if your report has any grouping levels, Access adds group footers (if not already present) and places the total in each footer.

Note:  You can also add totals by clicking the field that you want totaled and then, on the Design tab, in the Grouping & Totals group, click Totals.

Working in the Group, Sort, and Total pane gives you the most flexibility when you want to add or modify groups, sort orders, or totals options on a report. Again, Layout view is the preferred view in which to work because it is much easier to see how your changes affect the display of the data.

  • On the Design tab, in the Grouping & Totals group, click Group & Sort.

    Access displays the Group, Sort, and Total pane.

Sort the records in this table so they are grouped by the value in the classification field

To add a new sorting or grouping level, click Add a group or Add a sort.

A new line is added to the Group, Sort, and Total pane, and a list of available fields is displayed.

Sort the records in this table so they are grouped by the value in the classification field

You can click one of these field names or you can click expression below the list of fields to enter an expression. Once you choose a field or enter an expression, Access adds the grouping level to the report. In Layout view, the display changes immediately to show the grouping or sort order.

For more information about creating expressions, see the article Build an expression.

Notes: 

  • If there are already several sorting or grouping levels defined, you may need to scroll down in the Group, Sort, and Total pane before you can see the Add a group and Add a sort buttons.

  • You can define up to 10 grouping and sorting levels in a report.

Each sorting or grouping level has a number of options that can be set to obtain the results you want.

Sort the records in this table so they are grouped by the value in the classification field

  • To display all the options for a grouping or sorting level, click More on the level that you want to change.

    Sort the records in this table so they are grouped by the value in the classification field

  • To hide the options, click Less.

Sort order    You can change the sort order by clicking the sort order drop-down list, then clicking the option you want.

Group interval    This setting determines how the records are grouped together. For example, you can group on the first character of a text field so that all that start with "A" are grouped together, all that start with "B" are grouped together, and so on. For a date field, you can group by day, week, month, quarter, or you can enter a custom interval.

Totals    To add totals, click this option. You can add totals on multiple fields, and you can do multiple types of totals on the same field.

Sort the records in this table so they are grouped by the value in the classification field

  • Click the Total On drop-down arrow and select the field you want to have summarized.

  • Click the Type drop-down arrow and select the type of calculation to perform.

  • Select Show Grand Total to add a grand total to the end of the report (in the report footer).

  • Select Show group totals as % of Grand Total to add a control to the group footer that calculates the percentage of the grand total for each group.

  • Select Show in group header or Show in group footer to display the total in the desired location.

Once all the options have been chosen for a field, you can repeat the process and summarize another field by selecting the other field from the Total On drop-down list. Otherwise, click outside the Totals pop-up window to close it.

Title    This allows you to change the title of the field being summarized. This is used for the column heading and for labeling summary fields in headers and footers.

To add or modify the title:

  • Click the blue text following with title.

    The Zoom dialog box appears.

  • Type the new title in the dialog box, and then click OK.

With/without a header section    Use this setting to add or remove the header section that precedes each group. When adding a header section, Access moves the grouping field to the header for you. When you remove a header section that contains controls other than the grouping field, Access asks for confirmation to delete the controls.

With/without a footer section    Use this setting to add or remove the footer section that follows each group. When you remove a footer section that contains controls, Access asks for confirmation to delete the controls.

Keep group together    This setting determines how groups are laid out on the page when the report is printed. You may want to keep groups together as much as possible to reduce the amount of page turning that is needed to see the entire group. However, this usually increases the amount of paper needed to print the report, because most pages will have some blank space at the bottom.

  • Do not keep group together on one page    Use this option if you are not concerned about groups being broken up by page breaks. For example, a group of 30 items may have 10 items on the bottom of one page and the remaining 20 items at the top of the next page.

  • Keep whole group together on one page    This option helps minimize the number of page breaks in a group. If a group cannot fit in the remaining space on a page, Access leaves that space blank and begins the group on the next page instead. Large groups may still span multiple pages, but this option minimizes the number of page breaks within the group as much as possible.

  • Keep header and first record together on one page    For groups with group headers, this ensures that the group header will not print by itself at the bottom of a page. If Access determines that there is not enough room for at least one row of data to be printed after the header, the group begins on the following page.

To change the priority of a grouping or sorting level, click the row in the Group, Sort, and Total pane and then click the up arrow or the down arrow on the right side of the row.

To delete a grouping or sorting level, click the row you want to delete in the Group, Sort, and Total pane, and then press DELETE or click the Delete button on the right side of the row. When you delete a grouping level, if the grouping field was in the group header or footer, Access moves it to the report's Detail section. Any other controls that were in the group header or group footer are deleted.

If you want to show only totals (that is, just the information in header and footer rows), on the Design tab, in the Grouping & Totals group, click Hide Details. Doing this hides the records at the next lower level of grouping, resulting in a much more compact presentation of the summary data. Although the records are hidden, the controls in the hidden section are not deleted. Click Hide Details again to restore the Detail rows to the report.

Top of page