How to use Recordset.StillExecuting

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hi All,

I have a database that enables the user to make selections
that can be used to create queries. The problem I have is
that some of these filters create queries that run a long
time and the users are closing the database through
Windows Task Manager and it corrupts the database.
What I would like to do is present the user with a pop up
window while the query is running that gives them the
option to cancel the query and close the database properly.
My code snippet is:

Do While Recordset.StillExecuting = True
MsgBox Prompt:="Click OK to stop the Query", _
Buttons:=vbOkOnly, _
Title:="Cancel Query"
Loop

I am getting the error message:

3251 Operation is not supported for this type of object

Any help is appreciated.

Thanks.

Jeff
 
Hi,
I'm not sure what your supporting code looks like, but have you looked up this
property in Help? They have very specific examples of how to use this property.
Here is the first thing it says:

"Indicates whether or not an asynchronous operation

(that is, a method called with the dbRunAsync option)

has finished executing (ODBCDirect workspaces only)."



Check it out.

Dan Artuso, MVP
 
Back
Top