Contents Index Topic Contents |
RecordCount Property - ADO
Indicates the current number of records in a Recordset object.
Applies To
Return Values
Returns a Long value.
Remarks
Use the RecordCount property to find out how many records are in a Recordset object. The property returns -1 when ADO cannot determine the number of records. Reading the RecordCount property on a closed Recordset causes an error.
If the Recordset object supports approximate positioning or bookmarks — that is, Supports (adApproxPosition) or Supports (adBookmark), respectively, returns True — this value will be the exact number of records in the Recordset regardless of whether it has been fully populated. If the Recordset object does not support approximate positioning, this property may be a significant drain on resources because all records will have to be retrieved and counted to return an accurate RecordCount value.
Examples
Filter and RecordCount Properties Example (VB)
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.