SortAscending Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

expression.SortAscending

expression   Required. An expression that returns a DataPage object.

Remarks

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.

Example

This example sorts the ProductName field in ascending order.

  Sub SortProductNameAscending()

   ' Set focus to the control for the ProductName field.
   MSODSC.Datapages(0).FirstSection.HTMLContainer.Children("ProductName").Focus

   ' Sort the field in descending order.
   MSODSC.DataPages(0).SortAscending

End Sub