>> check whether still processing

  • Thread starter Thread starter Jonathan
  • Start date Start date
J

Jonathan

Hi, using Access 2003, is it possible to check whether a process has
completed. That is when I step through the code a query that relies on a
previous line suns successfully. However, when simply running the routine the
query fails. I can put an arbitary wait of 1 second. But this seems like a
work-around and there must be a better way.

Any ideas or suggestions appreciated :-)

Many thanks,
Jonathan
 
Hi, using Access 2003, is it possible to check whether a process has
completed. That is when I step through the code a query that relies on a
previous line suns successfully. However, when simply running the routinethe
query fails. I can put an arbitary wait of 1 second. But this seems like a
work-around and there must be a better way.

Any ideas or suggestions appreciated :-)

Many thanks,
Jonathan

put an Application.DoEvents after the line that you need to wait for.
That should force it to complete before executing the next line of
code.
 
Jonathan said:
Hi, using Access 2003, is it possible to check whether a process has
completed. That is when I step through the code a query that relies on a
previous line suns successfully. However, when simply running the routine the
query fails. I can put an arbitary wait of 1 second. But this seems like a
work-around and there must be a better way.


There should be no need to figure put how to do that (and I
don't know of one.

As a wild guess, you are using RunSQL or OpenQuery to update
a table. Those methods do run asynchronously and can easily
create the issue you are seeing. If that's the case, u7se
the Execute method instead.

If that doesn't get you back on track, you should post the
relevant code so we can see if there's another way to do
whatever id is that you need.
 
DoEvents yields control to the system/processor and you procedure continues
without waiting.
Shell and Wait may be what you are looking for
http://www.mvps.org/access/api/api0004.htm



Hi, using Access 2003, is it possible to check whether a process has
completed. That is when I step through the code a query that relies on a
previous line suns successfully. However, when simply running the routine
the
query fails. I can put an arbitary wait of 1 second. But this seems like a
work-around and there must be a better way.

Any ideas or suggestions appreciated :-)

Many thanks,
Jonathan

put an Application.DoEvents after the line that you need to wait for.
That should force it to complete before executing the next line of
code.
 
Back
Top