Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resorting by Clicking on Column Heading

Status
Not open for further replies.

khood

Programmer
Aug 27, 2000
163
0
0
US
Somewhere I have seen an example of how to display the results of a query, then allow the user to click on a column heading to resort by that field. Anyone have an example of this?

My approach is to add labels at the top of my control and requery with the new sort in the click event of that label. Is that the best way to handle this?

Thanks,
Ken Hood
 
I would just place this on the click event of the field I want to sort by.
docmd.runcommand acCmdSortAscending

 
Braindead2,

Thanks for your reply. I guess I was a little vague in my original post. The form has only an unbound listbox control based on a recordset, so I need to be able to detect which field they want to sort by.

Thanks,
Ken Hood
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top