Query Result sort by different field

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.
 
G

Graham Mandeno

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top