dialog - MS Access freezes while running VBA, then unfreezes once finished -


i've got vba script loops through table , works fine except while runs code access freezes. once code run, unfreezes , showed (the vba performed required actions, opens final query coded etc.)

this fine until because i've implemented (or want implement) "progress status" function of vba script. because due new requirements table being analyzed jumped 4,000 records 50,000 records.

i've done using simple modal dialog form refreshes after each record.

the modal dialog opened:

docmd.openform ("progressreport") forms("progressreport").controls("progresslabel").caption = "0 of " & recordcount & " records analyzed." 

then after each iteration:

recordsanalyzed = recordsanalyzed + 1 forms("progressreport").controls("progresslabel").caption = recordsanalyzed & " of " & recordcount & " records analyzed." forms("progressreport").repaint 

is possible allocate 'memory' modal form if access freezes, kept alive? code complicated until (eof) , if statements - pretty basic vba functions. thoughts on how can progress bar work? without or without modal dialog.

i've looked editing status bar however, won't work either given access freezes.

what need doevents statement.

what let other items in cpu queue run. slow down app, you'll control of application back.

put command inside 1 of loops.

btw, it's easy overuse doevents. so post tell more.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -