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

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

golfinray

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.
 

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