Form.MaxRecords property (Access)

Specifies the maximum number of records by a query or view. Read/write Long.

Syntax

expression.MaxRecords

expression A variable that represents a Form object.

Remarks

When you set this property in Visual Basic, you use the ADO MaxRecords property.

Records are returned in the order specified by the query's ORDER BY clause.

Use the MaxRecords property in situations where limited system resources might prohibit a large number of returned records.

Example

To return the MaxRecords property for a form, you can use the following syntax.

Dim l As Longl = Forms(formname).MaxRecords

To set the MaxRecords property, you can use the following syntax.

Forms(formname).MaxRecords = numrecords

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.