Access 2010: Where/how to place subroutine call on progress bar form

Posted on 2013-09-18
Medium Priority
Last Modified: 2013-09-23
I have a splash screen that has two progress bars on it.
I want the splash screen to run a module subroutine that takes some time. I have inserted the code for the progress bars into the subroutine.

Where do I place the code for the call to the subroutine?

The user will have no button to press, I just want the form to open, load and then run the subroutine which should update the PBs.
I cant place the call in the LOAD, because the form is not visible.

Where?  and can I refresh the form from a module "generically" somehow or do I have to hardcode the form's name into the subroutine (I would rather not hard code it).
Question by:GNOVAK
  • 7
  • 2

Expert Comment

ID: 39502580
Why not open the splash screen as part of the process that runs a long time, at the start, and then update your progress bars as the long process continues, then close the spash screen when the long process finishes?

Author Comment

ID: 39502705
The login screen occurs first, then the splash screen.
I was opening an "invisble" form and calling the splash from there, but it just seems that there should be some way to have a screen shown to the user and then some event that could kick something off automagically.
LVL 50

Expert Comment

by:Dale Fye
ID: 39502726

Are you using the progress bar form that is referenced in my article and your previous question?
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.


Author Comment

ID: 39503019
nope, sorry,
using FMS progress bars.

Author Comment

ID: 39503058
now a new problem.
I moved the code to the login form.
The flow is
open splash screen
frmLogin process loop
     update Progress
close splash
open menu

Problem is that the splash screen doesnt paint itself on the screen. It just has a transparent shell, does it's work saying it's not responding and then opens the menu

Aaaarg! (getting ready for International Talk Like a Pirates Day)


Expert Comment

ID: 39503304
I take it you've not turned off screen updating (sorry, had to ask) and have tried such things as DoEvents after updating the ProgressBar or even the Repaint method to force the Splash Screen to be redrawn/updated?

Author Comment

ID: 39503338
WIth this particular PB,  the value is suppose to be updated.
IN the code, I use a
Forms!frm_SplashScreen.pb_Detail.value = 20

when I stop the code and look, it isnt there.
So I do a

nada, zip.
I havent had the opportunity in the past to use the Timer event or DoEvents.
I did place a DoEvents after the value is updated per above, but I think the problem is how to update the value.

Author Comment

ID: 39503427
perhaps I have to set focus to the splash screen? but, if I do that, how do I get control back to the calling form?

Accepted Solution

GNOVAK earned 0 total points
ID: 39503613
Here's the solution.
(I love access 2010, I love access 2010, I love access2010...)

The value requires an Integer.
If I calculate  and type cast: INT(DetailCount/TotalCount * 100)
it should be an integer, right?
I have to dim an integer and then set the value.
For example,
Dim x as Integer
x= INT(DetailCount/TotalCount * 100)
 then send x across.

works like a champ.
(I love access 2010, I love access 2010, I love access2010...)

Author Closing Comment

ID: 39514221
Found the solution by isolating with a tex box and a command button.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

623 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