Applies To Report.
Description
You can use the GroupLevel property in Visual Basic to refer to the group level you are grouping or sorting on in a report.
Setting
The GroupLevel property setting is an array in which each entry identifies a group level. To refer to a group level, use this syntax:
GroupLevel(n) The number n is the group level, starting with 0. The first field or expression you group on is group level 0, the second is group level 1, and so on. You can have up to 10 group levels (0 to 9). The following sample settings show how you use the GroupLevel property to refer to a group level.Group level | Refers to |
GroupLevel(0) | The first field or expression you sort or group on. |
GroupLevel(1) | The second field or expression you sort or group on. |
GroupLevel(2) | The third field or expression you sort or group on. |
Private Sub Report_Open(Cancel As Integer)
Me.GroupLevel(0).ControlSource _
= Forms!SortForm!txtPromptYou
End Sub
See Also
ControlSource property, CreateGroupLevel function, GroupInterval property, GroupOn property, KeepTogether Property — Groups, SortOrder property.
Example
See the GroupInterval property example.