if then
Indicates: The current pointer position is before the first line of record
if then
Indicates: The current pointer position is after the last line of record
if not then
Indicates: The current pointer position has not reached the last record
if not then
Indicates: The current pointer's position has not reached the first record
-------------------------
###The following two items are recommended
if not ( and ) then
Indicates: The pointer is located in the RecordSet (not the last and first), which means there must be records.
if and then
Indicates: No records
eof: The pointer reaches the tail
bof : The pointer reaches the top
BOF Indicates that the current record location is before the first record of the Recordset object.
EOF Indicates that the current record position is after the last record of the Recordset object.
Return value
The BOF and EOF attributes return boolean values.
illustrate
Use the BOF and EOF properties to determine whether the Recordset object contains records, or whether the limit of the Recordset object is exceeded when moving from one record to another.
The BOF attribute returns True (-1) if the current record is before the first record, and False (0) if the current record is first or after it.
If the current record is after the last record of the Recordset object, the EOF attribute returns True, and the current record is or is before the last record of the Recordset object, False will be returned.
If the BOF or EOF attribute is True, there is no current record.
If you open a Recordset object without records, the BOF and EOF properties are set to True, and the RecordCount property of the Recordset object is set to zero. When opening a Recordset object that contains at least one record, the first record is the current record, and the BOF and EOF attributes are False.
If the last record kept in the Recordset object is deleted, the BOF and EOF properties remain False until the current record is rescheduled.
Indicates: The current pointer position is before the first line of record
if then
Indicates: The current pointer position is after the last line of record
if not then
Indicates: The current pointer position has not reached the last record
if not then
Indicates: The current pointer's position has not reached the first record
-------------------------
###The following two items are recommended
if not ( and ) then
Indicates: The pointer is located in the RecordSet (not the last and first), which means there must be records.
if and then
Indicates: No records
eof: The pointer reaches the tail
bof : The pointer reaches the top
BOF Indicates that the current record location is before the first record of the Recordset object.
EOF Indicates that the current record position is after the last record of the Recordset object.
Return value
The BOF and EOF attributes return boolean values.
illustrate
Use the BOF and EOF properties to determine whether the Recordset object contains records, or whether the limit of the Recordset object is exceeded when moving from one record to another.
The BOF attribute returns True (-1) if the current record is before the first record, and False (0) if the current record is first or after it.
If the current record is after the last record of the Recordset object, the EOF attribute returns True, and the current record is or is before the last record of the Recordset object, False will be returned.
If the BOF or EOF attribute is True, there is no current record.
If you open a Recordset object without records, the BOF and EOF properties are set to True, and the RecordCount property of the Recordset object is set to zero. When opening a Recordset object that contains at least one record, the first record is the current record, and the BOF and EOF attributes are False.
If the last record kept in the Recordset object is deleted, the BOF and EOF properties remain False until the current record is rescheduled.