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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to create a push button to sort my fields 1

Status
Not open for further replies.

Taecca

Technical User
Jul 20, 2004
59
US
I have a continuous form with a few different columns.
I wish to add a button at the top of each column for the user to press and sort by that column. I will then add a refresh to the code to display the newly sorted records.

Can that be done?

Thank you for your help
 
In the OnClick event of each of the buttons, add a call to a function passing it the name of the field you want to sort on. For Example,

On Click... =SortColumn("FieldNameToSortBy")

Function SortColumn(strFieldName as String)

Me.OrderBy = strFieldName
Me.OrderByOn = True

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top