Dynamically Changing Report Sort

J

Joe Williams

Is there a way to dynamically change the sort on a report (And likewise hide
or show the appropriate headers/footers on the report)

I have a form that the user can select the sort method, which then calls one
of two different reports. I would like to keep one report format and change
the sorting on the fly if it can be done.

Thanks in advance

- joe
 
A

Allen Browne

See:
Sorting Records in a Report at run-time
at:
http://members.iinet.net.au/~allenbrowne/ser-33.html

Andy Baron explains how you can reassign the ControlSource of the GroupLevel
in the Open event of the report.

You could toggle the Visible property of the sections at the same time. From
memory, the Visible property does not show up in the enumerated list, but it
does exist.
 
D

Duane Hookom

PMFJI,
No, Allen would not make you open the report in design view. The code runs
in the On Open event of the report as it opens in preview or print mode.
 
A

Allen Browne

No, as Duane explained earlier, this approach does not need the report in
design view.

It therefore works in with MDE, runtime, ... anything you like.
 
L

Lynn

Allen and Duane.
Sorry about the multiple messages - I was getting a error message that the
post did not work. Also, when I would get a e-mail saying someone replied -
the link would not work.
Thanks
Lynn.
 
Top