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.

Applies to

Form Object

Report Object

You can use the OrderByOn property to specify whether an object's OrderBy property setting is applied. Read/write Boolean.

expression.OrderByOn

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

Remarks

The OrderByOn property uses the following settings.

Setting

Visual Basic

Description

Yes

True

The OrderBy property setting is applied when the object is opened.

No

False

(Default) The OrderBy property setting isn't applied when the object is opened.


Note: For reports, you can set the OrderByOn property by using the report's property sheet, a macro, or Visual Basic for Applications (VBA) code.

For all other objects, you can set the OrderByOn property by clicking a Sort button under Sort & Filter on the Home tab, or by using VBA.

When a new object is created, it inherits the RecordSource , Filter , OrderBy, OrderByOn, and FilterOn properties of the table or query it was created from.

Example

The following example displays a message indicating the state of the OrderByOn property for the "Mailing List" form.

MsgBox "OrderByOn property is " & _
Forms("Mailing List").OrderByOn

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!

×