Dealing with Access 2000 "not responding"??

battlecat

Registered User.
Local time
Today, 05:59
Joined
Jun 29, 2004
Messages
11
Hi there,

I have been having the hardest time with displaying a progress bar in Access 2000.

My "progress bar" is actually just slightly modified version of the non-control progress bar sample posted here: http://www.access-programmers.co.uk/forums/showthread.php?t=69362
(I am so grateful to person who posted it!!) The only thing I changed was I added Subs to the frmExample where I can set the max to the number of files my program has to process, and so I can "step" through from the code that is doing all the processing...

My problem is that when I try to open this progress bar form from my code for another form that is doing all the processing, it doesn't show up. I think this is because Access is in a "not responding" state because it is doing a large amount of processing. I open the Progress bar form and initialize it before my code reaches the part where the large amount of processing begins, but it seems like the code gets ahead of itself, and starts to not respond before the Progress Bar form even has a chance to open.

I don't encounter this problem if I stick MsgBoxes at the time just before or after I open the Progress bar form.... but when I take away the MsgBoxes (they only contained debug statements, so I don't want to leave them in) then the program does the whole "not responding" thing...

Also, when the progress bar form *does* show up (when I have msgBoxes), I have a button on it that I would like the user to be able to press to cancel the process. When ever I try to click the button, the form goes into a "not responding" state and then the progress bar doesn't even continue to redraw its self. The code always finishes executing and returns to normal, but I would love to know how to make this form display progress and respond to a user clicking the button.

I am using Me.Repaint at certain times, but that does nothing. Does anybody have any ideas or suggestions?? I would like to do something like a msgbox, where the code just waits for a couple of seconds, but I don't want to have user input....

I'm totally pulling my hair out over this! Thanks for taking the time to read this post, and I'd really appreciate ANY ideas!!!
 
Hi again...

I posted this question to a couple of other forums and some wonderful person suggested using DoEvents()

This works like a charm, and I thought I'd post the answer back here in case anyone comes across this my post when they are having similar problems....
 

Users who are viewing this thread

Back
Top Bottom