Report.GroupLevel (Access)

You can use the GroupLevel property in Visual Basic to refer to the group level that you are grouping or sorting on in a report.

The following sample settings show how you use the GroupLevel property to refer to a group level.

GroupLevel (Index)

Index: The group level, starting with 0. The first field or expression that you group on is group level 0, the second is group level 1, and so on.


Private Sub Report_Open(Cancel As Integer) 
 Me.GroupLevel(0).ControlSource _ 
 = Forms!SortForm!txtPromptYou 
End Sub