I have a report that has 2 groupings and 2 sortings. I want to use a form to dictate whether the top grouping (GroupHeader(0)) is on or not. I have it partially working, where it doesn't show the group or it's 1 textbox control. But the 2nd grouping still seems to group it's data by the first grouping that isn't showing. Can someone please help me understand what I am doing wrong?
This is my onopen of the report - I pass the openargs with a 1 or 0 based on a form checkbox.
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot
This is my onopen of the report - I pass the openargs with a 1 or 0 based on a form checkbox.
Code:
If Me.OpenArgs = 1 Then
Me.GroupLevel(0).ControlSource = "Field4"
Me.GroupLevel(0).SortOrder = True
Me.Section(5).Visible = True
Me.txtGroupException.Visible = True
Me.txtGroupException.ControlSource = IIf(Len([Field1]) > 0, [Field1] & ": ", "") & IIf(Len([Field2]) > 0, [Field2] & " - ", "") & IIf(Len([Field3]) > 0, [Field3], "") & " - (" & [Field4] & ")"
Else
Me.Section(5).Visible = False
Me.GroupHeader0.Visible = False
Me.txtGroupException.Visible = False
Me.txtGroupException.ControlSource = ""
End If
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot