See Also
Applies To
Table object, Dynaset object
Description
Indicates the approximate number of records in a recordset Not available at design time; read-only at run time.
Syntax
recordset.RecordCount
Remarks
The recordset is the Recordset property of a data control. In the Professional Edition, it can also be an object variable identifying a Table, Dynaset or Snapshot.
With the Recordset property of a data control, the RecordCount property indicates approximately how many records are in the Recordset property at the time the control was loaded. As you add and delete records with the data control in a single-user environment, the RecordCount property changes. However, in a multiuser environment, the RecordCount property may need to be updated more often. To update the current value of RecordCount, use MoveLast and then inspect the RecordCount value.
The total number of records in a Snapshot doesn't change even if the number of records in the underlying Tables changes.
A recordset with no records has a RecordCount value of 0. When you first open or create a recordset containing at least one record, RecordCount is 1 until you use one of the Move methods.
Tip Do not use the RecordCount property to cycle through records in a recordset. Use Do While Not EOF...Loop to cycle toward the last record, or Do While Not BOF...Loop to cycle toward the first record.
Data Type
Long