Share via


QueryDef.Cancel Method

Access Developer Reference
Bb243085.vs_note(en-us,office.12).gif  Note
ODBCDirect workspaces are not supported in Microsoft Office Access 2007. Use ADO if you want to access external data sources without using the Microsoft Access database engine.

Cancels execution of a pending asynchronous method call (ODBCDirect workspaces only).

Syntax

expression.Cancel

expression   A variable that represents a QueryDef object.

Remarks

Use the Cancel method to terminate execution of an asynchronous Execute or OpenConnection method call (that is, the method was invoked with the dbRunAsync option). Cancel will return a run-time error if dbRunAsync was not used in the method you're trying to terminate.