Access Hangs (1 Viewer)

TiggerNYC

Registered User.
Local time
Today, 04:41
Joined
Aug 7, 2003
Messages
13
I am having difficulty with Access hanging using vba for report generation. The module is not complex...opening a QBF, running queries and then the report. (Windows XP, Access XP) - Bkend on Server, Ftend on local machine...

Once the report displays...it is not "enabled"...nor is any of access...the function appears to have completed...but it appears that access is frozen.

Now this does not happen every time. I may happen if I try to do something else on the computer, while it is running the code. Or not...

I have seen some articles referring to memory leak...or network traffic...does anyone have any ideas to account for slowness on the network...or perhaps slow processing on the workstation? Or ever heard of this issue before?

FYI - the workstation is a new Dell P4 (2.0GHz?) and 1Gig RAM.

Thanks! :confused: :(
 

Fizzio

Chief Torturer
Local time
Today, 04:41
Joined
Feb 21, 2002
Messages
1,885
Have you tried using a DoEvents statement in your code? - This forces windows to do what it needs to do before moving on (I think) and therefore does not let access get ahead of itself. If you do not, post your code and we may be able to help you place the DoEvents statement in the best place.

In general, use it where there is looping code, code that requires the result of a query, SQL etc - ie that takes time to complete. It may make a huge difference.
 

TiggerNYC

Registered User.
Local time
Today, 04:41
Joined
Aug 7, 2003
Messages
13
Thanks for the advice...I will give it a try on Monday...if I have a problem, I will post the code...either way, I will let you know.

I did replace the docmd.runsql with currentdb.execute and it runs faster...and it did help with the hangs...but they still happen...but like I said...not all the time.

I appreciate the response.

;)
 

TiggerNYC

Registered User.
Local time
Today, 04:41
Joined
Aug 7, 2003
Messages
13
The DoEvents seems to be doing the trick...thanks.
 

Users who are viewing this thread

Top Bottom