This documentation is archived and is not being maintained.

SortDescending Method

Office 2003

Sorts a field on a data access page in descending order.


expression    Required. An expression that returns a DataPage object.


This method relies upon the current selection on the data access page to determine the field to sort by. Therefore, you must set the focus to the field to sort by, when the procedure containing this method is invoked by a control on the data access page, such as a command button.


This example sorts the ProductName field in descending order.

Sub SortProductNameDescending()

   ' Set focus to the control for the ProductName field.

   ' Sort the field in descending order.

End Sub


Applies to | DataPage Object