I've already posted a similar thread to this but it didn't help so I'm reopening it to try to get an answer.
The response I had previously was
This method I don't understand because I don't know what I should use as "GroupLevel", "txtGroup" and the "= "CarType"" etc.
As I have a number of buttons, could I avoid using the case-select and just set the grouping in the OnClick of each button?
The response I had previously was
Here's one way:
Code:Private Sub Report_Open(Cancel As Integer) Select Case Forms!frmReports.fraGrouping Case 1 'sort/group on car type Me.GroupLevel(0).ControlSource = "CarType" Me.txtGroup.ControlSource = "CarDesc" Case 2 'sort/group on company Me.GroupLevel(0).ControlSource = "Company" Me.txtGroup.ControlSource = "Company" Case 3 'sort on date/time, no grouping Me.GroupLevel(0).ControlSource = "DispDateTime" Me.txtGroup.ControlSource = "DispDateTime" Me.GroupHeader0.Visible = False End Select End Sub
This method I don't understand because I don't know what I should use as "GroupLevel", "txtGroup" and the "= "CarType"" etc.
As I have a number of buttons, could I avoid using the case-select and just set the grouping in the OnClick of each button?