?
Solved

Progress Bar on form while a macro is running

Posted on 2006-06-13
8
Medium Priority
?
475 Views
Last Modified: 2010-05-18
Hi everyone,
I have searched the board for how to make a progress bar run on a form - and I can do it when I am looping through records.  But now I have the simplest form with one button on it 'cmdrun' that runs on macro that is a series of queries.
Does anyone know how I can make the progress bar run with the macro?  The macro takes a while to run.

Thanks,
Jetera
0
Comment
Question by:jetera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 34

Accepted Solution

by:
jefftwilley earned 1000 total points
ID: 16895397
Here's a good discussion on the topic. Might answer your questions.
http://www.experts-exchange.com/Databases/MS_Access/Q_21812357.html?query=progress+bar&topics=39
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16895417
By macros, your not talking VBA code, but proper macros

well u could try this


Add this code into a vba module


Public Function UpdateStatusBar(ByVal sText As String)
    Application.SysCmd acSysCmdSetStatus, sText
End Function


Now in your Macro, add steps whereby you Run Code, select this function
And argument to this is some text u want displayed

0
 

Author Comment

by:jetera
ID: 16895716
Thanks, I can't do it - the second answer did not work either.
Too bad!
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 65

Expert Comment

by:rockiroads
ID: 16895802
What didnt work?

Did it not update the status bar?

If it didnt work or u cant do Jeff's suggestion, why did u close this question?
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16895851
There is another option as well...and that's to take the number of queries that you have, and break up your 100% width of your progress bar into #queries/100 widths. Then each time a query finishes, call a function similar to Rocki's that will push your progress bar out to the next width. It's not a proper progress bar, but it will simulate progress between each query in your macro.
ex:
Say you have 5 queries. After the first query runs, move your progress bar out 20% of the total width. After the next, push it out another 20%...until you get to 100.

J
0
 

Author Comment

by:jetera
ID: 16896073
I closed the question because I want a real status/progress bar.  Sorry - I didn't realize it everyone had more to say.  I needed a quick answer and something quick to try and I didn't get what I wanted.  Then I read the link that jefftwilley put and it answered my question.  What else can I do now?

0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16896284
Here's a good thread with the same discussions.
http://www.experts-exchange.com/Databases/MS_Access/Q_21875686.html
It kind of describes different options besides a true recordcount based progress bar. I've never had much luck with them other than Rocki's suggestion using the sysmeter commands. But you can try to throw up some kind of splash or interesting thing to watch. Just be sure to use a DoEvents somewhere inside your macro to let other things run while your queries run.
J
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16897904
jetera, no problems

I just asked based on your last post, when u said nothing seemed to have work but you closed it.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question