Report sorting

  • Thread starter Thread starter Scott Sisk
  • Start date Start date
S

Scott Sisk

I have a report that has 10 columns. I would like to give
the user a drop down box that will allow them to chose
which column the report will sort on. Is there a way to
do this?
 
Scott said:
I have a report that has 10 columns. I would like to give
the user a drop down box that will allow them to chose
which column the report will sort on. Is there a way to
do this?


I presume that you have a form with the field list combo box
and a button to open the report.

Given that, add an item in the report's Sorting and Grouping
to sort the report on any one of the fields in the report's
record source table/query. Then add a line of code to the
report's Open event procedure:

Me.GroupLevel(0).ControlSource = Forms!theform.thecombobox

If you have some other group levels, change the 0 to the
level of the sorting used for this purpose.
 
Back
Top