Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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

expression.SortOrder

expression Required. An expression that returns one of the objects in the Applies To list.

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.


Note: You can set the SortOrder property by using the Group, Sort, and Total pane, a macro, or Visual Basic for Applications (VBA) code.

In Visual Basic, you set the SortOrder property in Design view, Layout 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  

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×