Share via


EOF property

Returns the position of the current record in a Recordset object relative to the "End of File." If True, the current record position is after the last record. If False, the current record position is before the last record. If both the EOF property and the BOF property of the Recordset object are True, the record set is empty. Read-only Boolean.

Applies to

Objects: Recordset

Syntax

object.EOF

Parameters

Part

Description

object

Required. An expression that returns a Recordset object

Remarks

Example

Sub IsRecordsetEmpty()

Dim objApp As New MapPoint.Application
Dim objRS As MapPoint.Recordset

'Set up the application
objApp.Visible = True
objApp.UserControl = True

'Query to obtain all records in the record set
Set objRS = objApp.OpenMap(objApp.Path & "\Samples\Clients.ptm").DataSets("Clients").QueryAllRecords

'Record set is empty if both are true
If objRS.BOF And objRS.EOF Then
    MsgBox "The record set is empty."
Else
    MsgBox "Record set is not empty. It contains " _
        + CStr(objRS.Parent.RecordCount) + " records."
End If

End Sub