EOF

This property Indicates that the current record position is after the last record in a recordset.

Syntax

recordset.EOF

Return Values

The return value for the EOF property is Boolean.

The EOF property returns True if the current record position is after the last record, and False if the current record position is on or before the last record.

If the EOF property is True, there is no current record.

Remarks

Use the EOF property to determine whether a Recordset object contains records or whether you have gone beyond the limits of a Recordset object when you move from record to record.

If you open a Recordset object containing no records, the EOF property is set to True, and the RecordCount property setting is 0. When you open a Recordset object that contains at least one record, the first record is the current record and the EOF property is False.

Calling the Delete method, even if it removes the only remaining record from a recordset, does not change the setting of the EOF property.

The following table shows what happens to the EOF property settings when you call various Move methods but are unable to successfully relocate a record.

Method EOF
MoveFirst, MoveLast True
Move=0 No change
MovePrevious, Move<0 No change
MoveNext, Move>0 True