About grouping records on intervals of autonumbered, currency, or numeric values on a data access page

About grouping records on intervals of autonumbered, currency, or numeric values on a data access page

This topic provides reference information about:

Data types required for grouping on intervals of autonumbered, currency, or numeric values

How a page that groups records on intervals of 100 dollars looks in Page view or in Microsoft Internet Explorer

How a page that groups records on intervals of 100 dollars looks in Design view

Settings for properties in the Sorting And Grouping box

Data types required for grouping on intervals of autonumbered, currency, or numeric values

When you group records by autonumbered, currency, or numeric values, the control you group on must be bound to a field with one of the following data types: an Autonumber, Currency, or Numeric data type in a Microsoft Access database (.mdb); or a decimal, numeric, int, smallint, tinyint, money, smallmoney, float, or real data type in a Microsoft Access project (.adp).

Return to top

How a page that groups records on intervals of 100 dollars looks in Page view or in Internet Explorer

To group records on an interval, you need two controls bound to the field you want to group on. You use one control to group the records and display the field values as intervals. You use the other control, which is placed in the next lower group level, to display the full value of the field. In the following example, the records come from a query named Sales. The records are grouped in intervals of 100 in a control bound to the SaleAmount field. In the next lower group level, the page displays, and sorts the records by, the actual values in the SaleAmount field.

Page that groups records on intervals of 100 dollars, in Page view or Internet Explorer

Return to top

How a page that groups records on intervals of 100 dollars looks in Design view

The following illustration shows the layout of the example page in Design view.

Page that groups records on intervals of 100 dollars, in Design view

Return to top

Settings for properties in the Sorting And Grouping box

The following table lists the properties that are set for the page in the Sorting And Grouping box. When you don't specify ASC or DESC after the field name in the DefaultSort property, Microsoft Access sorts the records in ascending order.

Property Group Record Source
Sales-SaleAmount
Group Record Source
Sales
CaptionSection No Yes
GroupHeader Yes Yes
GroupFooter No No
RecordNavigation Section Yes Yes
ExpandedByDefault No No
DataPageSize 3 3
GroupOn Interval Each Value
GroupInterval 100 1.0
DefaultSort GroupOfSaleAmount SaleAmount

Note   When you group on a control, Access creates an alias for the control by adding the prefix "GroupOf" to the control's name in the ControlSource property; for example, GroupOfSaleAmount: SaleAmount. When you reference this control in an expression or property, you must use the alias.

Return to top

Return to Group records on intervals of autonumbered, currency, or numeric values on a data access page