If I understand correctly, different versions of access under different
versions of windows will handle CPU load in various ways. Some Access
versions will utilize 100% of CPU usage, where other versions (say on a
Vista
Dual or Quad Core processor) will put a cap at a certain percentage.
I'm not positive about this, but I have a vauge recollection of reading
about it in some post or another.
On the other hand, I don't ever recall seeing code to specifically let you
do other things while your process executes. Vice-versa, there is a
ShellWait API that does the exact opposite, but I would think that in
order
to do what you are thinking, you would need some pretty serious
interaction
with how the OS handles CPU processing (which is something that is far far
over my head, and likely that's true for most people here). And if there
was
such code, it would probably vary between OS's. In any case, these seems
like quite the task.
I'm not even positive that DoEvents would have any effect here... I'm not
sure but I suspect that DoEvents yeilds only to the VBA process that's
running, not to every process being handled by the CPU. If such were the
case, DoEvents (VBA) would be required to interact with every running
process
on the computer. Consider that your computer is running a virus scan in
the
background... I don't think DoEvents would wait until that is complete
before
executing the next block of code... therefore my suspicion about DoEvents
working only within the scope of the current VBA project.
If in fact there is code to do this, I'm pretty sure it would invlove some
highly complex API calls working with CPU and memory buffers. This may be
well out of the scope of VBA's capabilities.
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)