I'd like to add a button to my form that, when clicked, sorts the records in ascending order based on a certain field. Does anyone have any code that I would use to accomplish this? Thanks!
I'd like to add a button to my form that, when clicked, sorts the records in ascending order based on a certain field. Does anyone have any code that I would use to accomplish this? Thanks!
Options include setting the OrderBy and OrderByOn properties, or setting the RecordSource property to an SQL statement with the appropriate sorting.
Would that by the OrderBy Property of the button? I heard that I could use something like this in the VBA Editor:
Code:FieldName.OrderBy
No, those are all properties of the form. You should see examples in VBA help.
What does your form look like? If you are using continuous view, you can click the down arrow on the header of the field to sort...
How does your original form sort?