The EndOfRecordset method is called when there is an attempt to move to a row past the end of the Recordset.
Syntax
EndOfRecordset fMoreData, adStatus, pRecordset
Parameters
fMoreData A VARIANT_BOOL. It is possible to append new records to pRecordset while processing this event. Before EndOfRecordset returns, add your data, then set this parameter to True to indicate that there is a new end to the Recordset.
adStatus An EventStatusEnum status value.
When EndOfRecordset is called, this parameter is set to adStatusOK if the operation that caused the event was successful. It is set to adStatusCantDeny if this method cannot request cancellation of the operation that caused this event.
Before EndOfRecordset returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.
pRecordset A Recordset object. The Recordset for which this event occurred.
Remarks
An EndOfRecordset event may occur if the Recordset.MoveNext operation fails.
This event handler is called when the user attempts to move past the end of pRecordset, perhaps as a result of calling MoveNext. However, while in this method the user could retrieve more records from a database and append them to the end of pRecordset. In that case, the user would set fMoreData to VARIANT_TRUE, and return from EndOfRecordset. Then the user could call MoveNext again to access the newly retrieved records.