The WillMove method is called before a pending operation changes the current position in the Recordset. The MoveComplete method is called after the current position in the Recordset changes.
Syntax
WillMove adReason, adStatus, pRecordset
MoveComplete adReason, pError, adStatus, pRecordset
Parameters
adReason An EventReasonEnum value. Specifies the reason for this event. Its value can be adRsnMoveFirst, adRsnMoveLast, adRsnMoveNext, adRsnMovePrevious, adRsnMove or adRsnRequery.
pError An Error object. It describes the error that occurred if the value of adStatus is adStatusErrorsOccurred; otherwise it is not set.
adStatus An EventStatusEnum status value.
When WillMove 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 pending operation.
When MoveComplete is called, this parameter is set to adStatusOK if the operation that caused the event was successful, or adStatusErrorsOccurred if the operation failed.
Before WillMove returns, set this parameter to adStatusCancel to request cancellation of the pending operation. Before MoveComplete returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.
pRecordset A Recordset object. The Recordset for which this event occurred.
Remarks
A WillMove or MoveComplete event may occur due to the following Recordset operations: Open, Move, MoveFirst, MoveLast, MoveNext, MovePrevious, Bookmark, AddNew, Delete, Requery, and Resync.