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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top