How to display status of macro progress on screen

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

Guest

I have a macro that copies about 6 or 7 large tables from an Oracle database
into a local Access db, using a series of MakeTable queries in the macro. The
whole set takes about 7 or 8 mins to complete. I am trying to show status on
screen, at least to show which table is being made at any given time. My
logic is as follows:
1. At beginning of macro, open a form called StatusForm, that just has a
label field in the middle.
2. Use Echo command in macro to show status bar text like "Making XYZ
table..." before each Maketable query is called. Works, but the progress bar
(showing how far through the query) immediately replaces the status text.
2. Use SetValue macro command, with Item argument set to
[Forms]![StatusForm]![DisplayLabel].[Caption] and Expression set to "Making
XYZ catalog..."
3. Send RepaintObject comamnd, object name is StatusForm.
4. Open the appropriate MakeTable query
Steps 2 to 4 are repeated for each table being created, obviously with XYZ
replaced with appropriate text.

This sort of works, in that the form appears and the label does change. But
the label changes inside the form do not appear to be synched with the
end/start of the queries, despite the repaint object command. Any ideas on
why this doesn't work, or any ideas on how properly to display this kind of
progress status (what step you're on in a macro)?
 
hi,
i have run in to that before. code is excuting too fast
for the screen to refresh. You might want to consider
converting your macro to vb code.
Tool>macro>convert macro to VB.
then you could throw in a few doevents to break up code
excecution and let the screen refresh.
you might want to check out this site for alternative ideas
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;Q103404
progress meter-how to use the status bar
 
Back
Top