How do I stop Access2002 freezing its window while code is running

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am upgrading some databases from Access97 to Access 2002, and also from a
NT4 environment to XP. The databases are big, have multiple linked tables and
also very complex SQL and Visual Basic Code which takes some time to run.

Ten seconds or so into the execution of some routines, the Access Window
appears to freeze until the code has executed. Echo is set to On while the
code is running, as Form captions are alterered to inform the User what is
happening behind the scenes.

This never happened with Access97, is this an XP issue or Access 2002 ?
 
Since I have no experience with 97 (except my Winchester '97 shotgun), so I
can't give an opinion on that; however, Access in pretty rude about hogging
cpu cycles when it is doing something. There are two things you can try that
may help.
1. In between actions that may take some time or at some point in a Loop,
put a DoEvents
2. If the DoEvents doesn't solve the problem and you are running from a
form, in the same locations, or right after you update your form captions,
try Me.RePaint
 
Many thanks for the responce "Klatuu"

I've tried making some form pop up and modal and doing repaint within loops
and the screen still stopped refershing. I'll try doing so "Doevents" at key
points to see it that is the silver bullet. If that fail then I mau have to
do some research on Access hogging memory.

Thanks again

George
 
It is not memory it is hogging, it is CPU cycles. Each running process gets a
turn, but some process once they start don't let go. Access seems to be
pretty bad about that. Even the DoEvents will not be a silver bullet, but it
should help. The worst times seem to be when running queries. It seems that
once a query kicks off, it does not let go until it has completed.
 
Back
Top