BOF indicates that the current recording location is before the first record of the Recordset object. EOF indicates that the current recording location is after the last record of the Recordset object.
return value
BOF and EOF attributes return to the Boolean value.
Description
Using the BOF and EOF attributes can determine if the RECORDSET object contains a record, or does it exceed the restriction of the Recordset object when moving from one record to another record.
If the current record is before the first record, the BOF property will return true (-1) if the current record is the first record or after it is later, will return false (0).
If the EOF attribute will return True after the last record of the Recordset object, the last record of the Recordset object is currently recorded, will return FALSE.
If the BOF or EOF property is TRUE, there is no current record.
If you open the recorded RecordSet object, the BOF and EOF properties will be set to True, and the RecordCount property of the Recordset object is set to zero. When the Recordset object containing at least one record is opened, the first record is the current record, and the BOF and EOF attribute are false.
If the last record reserved in the Recordset object, the BOF and EOF properties will remain false until the current record is rearranged.
The following table illustrates the Move method allowed by different BOF and EOF attributes.
Movefirst, MoveSt MovePrevious, Move <0 Move 0 Movenext, Move> 0 Bof = true, EOF = false Allow Error Error Allow BOF = false, EOF = true Allow Error Error Error Error Error Error Error Error Error Monitor Allow Allow Allow allow
Allows the use of the MOVE method to ensure successful positioning records, but means that the specified MOVE method does not generate errors.
The following table describes what happens when the various MOVE methods but not successfully locate the record.
Bof EOF Movefirst, MoveLast Set to True Set to True Move 0 No change No change MovePrevious, Move <0 Set to true No change MoveNext, Move> 0 No change Set to TRUE