GroupLevel.SortOrder property (Access)

You use the SortOrder property to specify the sort order for fields and expressions in a report. For example, if you are printing a list of suppliers, you can sort the records alphabetically by company name. Read/write Boolean.

Syntax

expression.SortOrder

expression A variable that represents a GroupLevel object.

Remarks

The SortOrder property uses the following settings.

Setting Visual Basic Description
Ascending False (Default) Sorts values in ascending (A to Z, 0 to 9) order.
Descending True Sorts values in descending (Z to A, 9 to 0) order.

In Visual Basic, you set the SortOrder property in report Design view or in the Open event procedure of a report by using the GroupLevel property.

Example

The following example sets the sort order to ascending for the first group level in the Product Summary report.

Reports("Product Summary").GroupLevel(0).SortOrder = False 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.