Change sort with code

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Hello, I have a Access 97 app and want to change the second layer sort of a
report by using code. How is this done?

ThanksDon
 
If the report has nothing in its Sorting And Grouping (View menu), you can
specify mulitple fields in its OrderBy property:
Me.OrderBy = "Field1; Field2"
Me.OrderByOn = True

More likely, you need to reassign the ControlSource of the GroupLevel in the
Open event of the report. Details in Andy Baron's article:
Sorting Records in a Report at run-time
at:
http://allenbrowne.com/ser-33.html
 
I tried the code but it doesn't appear the report_open event is firing. Not
sure why not.

Don
 
Back
Top