GroupOn Property

Applies To

Report, Sorting And Grouping Box.

Description

You can use the GroupOn property to specify how to group data in a field or expression by data type. For example, this property lets you group a Date field by Month.

Setting

The GroupOn property settings available for a field depend on its data type, as the following table shows. For an expression, all of the settings are available. The default setting for all data types is Each Value.

Field data type

Setting

Groups records with

Visual Basic

Text

(Default) Each Value

The same value in the field or expression.

0

Prefix Characters

The same first n number of characters in the field or expression.

1

Date/Time

(Default) Each Value

The same value in the field or expression.

0

Year

Dates in the same calendar year.

2

Qtr

Dates in the same calendar quarter.

3

Month

Dates in the same month.

4

Week

Dates in the same week.

5

Day

Dates on the same date.

6

Hour

Times in the same hour.

7

Minute

Times in the same minute.

8

AutoNumber, Currency, Number

(Default) Each Value

The same value in the field or expression.

0

Interval

Values within an interval you specify.

9


You can set the GroupOn property in the Sorting And Grouping box, a macro, or Visual Basic.

Using Visual Basic, you set this property in the Open event procedure of a report.

Remarks

To set the GroupOn property to a value other than Each Value, you must first set the GroupHeader or GroupFooter property or both to Yes for the selected field or expression.

See Also

CreateGroupLevel Function; GroupHeader, GroupFooter Properties; GroupInterval Property; GroupLevel Property; KeepTogether Property — Groups; SortOrder Property.

Example

See the GroupInterval property example.