how to add sort button on form? a>z or z<a

  • Thread starter Thread starter Haroon
  • Start date Start date
H

Haroon

hi

i want to add sorting buttons on the form as i dont want to use the standard
toolbar buttons to sort data, ascending and descending buttons which are in
sorting toolbar.

many thanks.
 
Put a label on the form. Right click on it to get properties and go to
events. On the Onclick property, start the code builder. Type:
Me.orderby = "[id or whatever you want to sort by]"
Me.orderbyon = True
Now when you press the label it will sort. You can have as many as you want.
 
Back
Top