SortOrder Property

Applies To

Report, Sorting and Grouping Box.

Description

You use the SortOrder property to specify the sort order for fields and expressions in a report. By specifying a sort order, you can organize your records in a particular order. For example, if you’re printing a list of suppliers, you can sort the records alphabetically by company name.

Setting

The SortOrder property uses the following settings.

Setting

Description

Visual Basic

Ascending

(Default) Sorts values in ascending (A to Z, 0 to 9) order

False (0)

Descending

Sorts values in descending (Z to A, 9 to 0) order

True (-1)


You can set the SortOrder property in the Sorting and Grouping box of a report, a macro, or Visual Basic.

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

See Also

CreateGroupLevel Function; GroupHeader, GroupFooter Properties; GroupInterval Property; GroupLevel Property; GroupOn Property; KeepTogether Property — Groups.

Example

See the GroupInterval property example.