
Multithreading in Access - Is it possible?
Hi,
Access has only one single thread of execution allocated to VBA code. You
can use DoEvents to JUMP all over the suspended code, but that may become
quite complex and since a DoEvents is hard coded, you have few control over
it if more than one subroutine uses this strategy at the same time. Try
using a event, a timer, an ActiveX or even an out-process execution if it is
really complex. In a multi-users environment, can use a dedicated PC for
that job, relieving the other "working" PC of this fastidious job,
large-grain parallelism is so easy these days...
Hope it may help,
Vanderghast, Access MVP.
Quote:
>The answer will propably no, but I ask anyway.
>I want to periodically (at most once per minute) start a possibly computing
>intensive action while at the same time the user can continue with other
>work in the same Access application.
>The solution that came to my mind was to start a low priority thread, but
>how?
>Starting a second instance of Access (a new process) is not a real option
>because of to much overhead (the MDE is about 40MB).
>Any other ideas?
>TIA, Kai