CAdoEvents.WillMovemethod
The **WillMove** event is called before a pending operation changes the current position in the **Recordset**.
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.
Syntax
FUNCTION WillMove (BYVAL adReason AS EventReasonEnum, BYVAL adStatus AS EventStatusEnum PTR, BYVAL pRecordset AS Afx_ADORecordset PTR) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
adReason | An EventReasonEnum value that specifies the reason for this event. Its value can be adRsnMoveFirst, adRsnMoveLast, adRsnMoveNext, adRsnMovePrevious, adRsnMove, or adRsnRequery. | |
adStatus | EventStatusEnum. 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. 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. | |
pRecordset | A Recordset object. The Recordset for which this event occurred. |
Description
Called before a pending operation changes the current position in the Recordset.
Remarks
A WillMove or MoveComplete event may occur due to the following Recordset operations:
- Open
- Move
- MoveFirst
- MoveLast
- MoveNext
- MovePrevious
- AddNew
- Requery
These events may occur because of the following properties:
- Filter
- Index
- Bookmark
- AbsolutePage
- 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.
Reference
- Documented in Databases/ADO Classes/CAdoEvents Class.md
- Topic: CAdoEvents Class