Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Things freeze up while recordset processes

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
0
0
US
I have form that runs a process using DAO recordsets. I have built a progress bar on the form. This progress bar has worked with other recordset processing. This particular process (updates) takes a long time and freezes up the screen. I don't see the results of the progress bar until it's done.

Can anyone give me some advice as to how I can see the process while the updates are being made?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I'd say not to update the progress bar per each iteration, but, at some intervals:

[tt]if mycounter mod 100 = 0 then
' update progress bar
DoEvents
end if[/tt]

Be aware that when using DoEvents, the system will process other events also (such as buttons/menus that are clicked in the mean time), so you'll probably need to disable such possibilities while the process goes on.

Roy-Vidar
 
This was actually resolved by a suggestion to use Me.Repaint with each iteration of the progress bar's increment.

Now I have another problem with it. When I go to another program such as word or I E Explorer and go back to Access the screen is frozen at the point where I left and can not see the updates.

Any suggestions as to why and what I can do to rectify it?


ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
No need. I was using Me.Repaint instead of DoEvents. Actually I needed both. I'm ok now.

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top