Query Result sort by different field

  • Thread starter Thread starter paul
  • Start date Start date
P

paul

Hi,
On my Access 2000 application, I have a query result
form, to display class roster information, e.g. Class No,
Class description, End Date...the record source come from
a query.
Currently the query is sort by Class No, the user want
the ability to sort by differnt criteria, so if they
double clcik the header of End Date, the screen will sort
by End Date. How can I accomplish this task? When the user
double clcik the header, how can I modify the sort order?
Or simply created another query?
Thanks.
 
Hi Paul

There is no need to create another query. Just modify the OrderBy property
of the form.
For example:

Private Sub lblEndDate_DblClick(Cancel an Integer)
Me.OrderBy = "[End Date]"
Me.OrderByOn = True
End Sub

Of course, unless you have disabled the built-in toolbars, the user can also
achieve this by clicking on the A-Z sort button.
 
Back
Top