The WillMove event is called before a pending operation changes the current position in the Recordset. The MoveComplete event is called after the current position in the Recordset changes.
WillMove adReason, adStatus, pRecordset MoveComplete adReason, pError, adStatus, pRecordset
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 event 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 to adStatusErrorsOccurred if the operation failed.
Before WillMove returns, set this parameter to adStatusCancel to request cancellation of the pending operation or set this parameter to adStatusUnwantedEvent to prevent subsequent notications.
Before MoveComplete returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.
A WillMove or MoveComplete event may occur due to the following Recordset operations: Open, Move, MoveFirst, MoveLast, MoveNext, MovePrevious, AddNew, and Requery. These events may occur because of the following properties: Filter, Index, Bookmark, AbsolutePage, and AbsolutePosition. These events also occur if a child Recordset has Recordset events connected and the parent Recordset is moved.
You must set the adStatus parameter to adStatusUnwantedEvent for each possible adReason value in order to completely stop event notification for any event that includes an adReason parameter.
Applies To: Recordset Object