set grouping at runtime for reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that lets users filter the report data, but I need to allow
them to group by user specified levels. How can I provide users some sort of
checkboxes and then group the report to those specs at runtime with VBA??
 
Wade said:
I have a form that lets users filter the report data, but I need to allow
them to group by user specified levels. How can I provide users some sort of
checkboxes and then group the report to those specs at runtime with VBA??


The max number of group levels you will need must exist in
design view. Then you can manipulate them in the report's
Open event:

Me.GroupLevel(0).ControlSource = Forms!yourform.sometextbox

You can effectively disable a group level by setting the
control source to a constant expression:

Me.GroupLevel(0).ControlSource = "=1"

If you also want to hide a section, then set its Visible
property:

Me.Section(5).Visible = False
 
Back
Top