Name

Recordset.PageCount Property — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

                     pagecount = recordset.PageCount

The PageCount property returns the number of logical pages that are in the current Recordset object.

Datatype

Long

Description

The PageCount property returns a value indicating how many logical pages of data are contained within the recordset. A page is determined by the number of records in the recordset divided by the number of records per page (determined by the PageSize property).

If the last page does not contain the number of records in the PageSize property, that page is still counted as a page in the PageCount property.

Returns

If the Recordset object does not support the PageCount property, the return value is -1. This indicates that the number of pages could not be determined.

See Also

Recordset.AbsolutePage Property, Recordset.PageSize Property

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.