>I have a series of reports that are all essentially the same except for
>an extra grouping. I figured that, if I set the Section to Not Visible
[quoted text clipped - 4 lines]
>Section(#).Grouping = False, which I noticed is not a valid method, or
>just to remove the section altogether for a while.
If you want the report sorted by the grouping field, then
you need to use the report's Open event procedure to set the
corresponding GroupLevel's ControlSource to =""
You will still get a group header/footer for the "" group,
so you still need to make it invisible.
The code will be something like:
If <some condition> Then
Me.GroupLevel(NN).ControlSource = ""
Me.Section(KK).Visible = False
End If

Signature
Marsh
MVP [MS Access]
dmeiser - 31 Oct 2005 20:03 GMT
Access wouldn't let me set the ControlSource to "", but I was able to
work around that by just setting the ConstrolSource equal to the next
ControlSource. Essentially, I have 3 control sources, and I just
doubled up the second when I don't want grouping by the first.
Marshall Barton - 31 Oct 2005 21:50 GMT
>Access wouldn't let me set the ControlSource to "", but I was able to
>work around that by just setting the ConstrolSource equal to the next
>ControlSource. Essentially, I have 3 control sources, and I just
>doubled up the second when I don't want grouping by the first.
That will usually work (sometimes you might need to set it
to the previous group), but I mispoke before, it should be
Me.GroupLevel(NN).ControlSource = "=1"

Signature
Marsh
MVP [MS Access]