ADO EndOfRecordset (RecordsetEvent) method
If you attempt to move to a row that exceeds the end of the Recordset, the EndOfRecordset method is invoked.
Grammar
EndOfRecordset Fmoredata, adstatus, precordset
Parameters
Fmoredata Variant_bool, it is possible to append new records to precordset during the processing of this event. Add the data before EndOfRecordset returns, and then set the argument to True to indicate a new end of the Recordset.
Adstatus EventStatusEnum state value.
When EndOfRecordset is invoked, the parameter is set to adStatusOK if the operation that raised the event succeeds. Set to adStatusCantDeny if the method cannot request the cancellation of the action that raised the event.
Setting this parameter to adStatusUnwantedEvent can avoid subsequent notifications before EndOfRecordset returns.
Precordset the Recordset object that occurs for the recordset that the event is directed to.
Description
If the Recordset.movenext operation fails, the EndOfRecordset event may occur.
The handler for the event is invoked when the user may have moved past the end of the precordset as a result of calling MoveNext. With this method, the user can retrieve more records from the database and append them to the end of Precordset, in which case the user will set the Fmoredata to VARIANT_TRUE and return from EndOfRecordset. After this, the user can call MoveNext again to access the newly retrieved record.