Sort report by clicking header

Supraracer

New member
Local time
Today, 10:22
Joined
Feb 24, 2009
Messages
6
I have a report that sorts by Date and also has Job_Name field. I want to know if you can sort the report by Job Name while the report is open by clicking on the header label for Job Name. If so how would the code look.


John
 
Are you using Access 2007? If not then it can't be done as there are no click events in reports prior to 2007.
 
In short this means you should do what ever sorting needs to be done before the report is open, like via a form.
 
In short this means you should do what ever sorting needs to be done before the report is open, like via a form.


Yes I am using 2007 Access. Sorry about that. I have it sorted by Date which is the way I like it but would also be nice to switch on the fly.


John
 
Not sure about where the event is that you would use, as I don't have 2007 here at work. But you would set the OrderBy property and then the OrderByOn.

Me.OrderBy = "FieldNameHere"
Me.OrderByOn = True

(air code - untested)
 

Users who are viewing this thread

Back
Top Bottom