GroupHeader Property

Microsoft Access Visual Basic

expression.GroupHeader

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

You can use group headers and footers to label or summarize data in a group of records. For example, if you set the GroupHeader property to Yes for the Categories field, each group of products will begin with its category name.

The GroupHeader and GroupFooter properties use the following settings.

Setting Description
Yes Creates a group header or footer.
No (Default) Doesn't create a group header or footer.

You set these properties in the Sorting And Grouping box.

You can set these properties only in report Design view.

Note  You can't set or refer to these properties directly in Visual Basic. To create a group header or footer for a field or expression in Visual Basic, use the CreateGroupLevel method.

To set the grouping properties— GroupOn, GroupInterval, and KeepTogether — to other than their default values, you must first set the GroupHeader or GroupFooter property or both to Yes for the selected field or expression.