Can I run an On Timer sub and a module simultaneously?

Abby N

Registered User.
Local time
Today, 13:56
Joined
Aug 22, 2000
Messages
123
I don't know whether or not what I want to do is feasible. But, I have a module that runs some action queries using the CurrentDb.Execute method. While that module is running I also have a form with a sub in its On Timer event that updates some controls on the form. The problem is when the Execute statements are running the form stops updating. Is there any way I can allocate some memory to the On Timer sub so that the form continues to update while the action queries are running?

~Abby
 
I believe the answer depends on several factors, one of which is your operating system - Win95, 98, NT, 2K, etc. and another on the nature of your computer system. If your computer has only one CPU, you can never run more than one thread simultaneously. The operating system will time-slice the threads so it appears that all of them are working, but they are not.

I know that if you have more than one CPU in the hardware box, you can run more than one thread at the same time. I believe this is the ability you would need to run the OnTimer and General Module code at the same time.
 
Thank you for the information. The database runs on a single processor under Win98. If it helps any I don't really care if they run simultaneously or just appear to. What I'm looking for is to have my form continue update every half a second while the database runs some action queries (3 append queries and a delete query). I’ve tried using QueryDef and running the queries asynchronously. But, I receive an ‘Invalid Argument’ error. I’m in over my head; is there no way of doing this without duel processors?

~Abby
 
I think that Access pretty much gobbles up all of the available cycles when it's executing a query, sometimes to the extent that you can't even launch another app outside of Access.

There *might* be something in the technical paper (all about the Jet database engine) that Rich has just referred me to; it's here: http://support.microsoft.com/support/kb/articles/Q162/7/01.asp

Mike
 

Users who are viewing this thread

Back
Top Bottom