Solved

Progress Bar on form while a macro is running

Posted on 2006-06-13
8
460 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 34

Accepted Solution

by:
jefftwilley earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, I can't do it - the second answer did not work either.
Too bad!
0
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 34

Expert Comment

by:jefftwilley
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now