"DoEvents" can be usefull in a code-loop. It gives Windows a chance to do
processing, such as displaying (your own) progress messages, or a chance to
analyse keystrokes either by Windows or your program, say an "Esc" key was hit
and what then to do?
It won't make your routine or query any faster. It might help to interrupt it
and ask whether to continue or abort in a controlled way (for instance).
If your query calls code written by yourself, there's a good chance you can
<CTRL><BREAK> into it. It's sorta chance, only usefull for developers forget
it for production install the last paragraph.
You seem to be worried about the 5-10 minutes. So have a joke on me:
<ring-ring>
Chris: "hello?"
Joe: "Your program locked up!"
Chris: "Ahhh...how long you run it?"
Joe: "5-10 minutes. It locked up! Task Manager says so!"
Chris: "Next time, leave it alone for 1/2hr or 1hr"
Joe: "You can't be SERIOUS" (he must have been John McEnroe)
Chris: "Hey, just do it for a test, go out to lunch or something. If it
completes Eventually, then maybe you need to compact like it says in my
manual)
Joe: (no feedback)
"Task Manager says so!"
Task Manager always says that regardless of what you do!
....but do make every effort to see if you can further "efficiencise" the
query...networks are a lot slower than local, and some ODBC connections can be
so slow as to be impractical, comparatively. DoEvents can't really speed
things up except to assist aborting or amusing them with progress messages.
Someone recently sent me an unsolicited 7mB e-mail enclosure. I'd like you to
assist me...
Chris