Progress Bar for Form Loading

J

jas580

I have a form with a tab subform. There are 5 tabs with a chart on each tab.
When I open this form, the chart queries each run in the background and I
get the hourglass for about 30 seconds. So, it takes about 5-6 seconds for
each tab to load its chart. I can't click any tabs until everything is
loaded.

I would like to display a progress bar to let impatient users know how much
of the load is finished. I've read and downloaded many examples of progress
bars and read all the posts here but I can't figure out how to implement this
on my form. Please advise...

Thanks,

Jeff
 
M

Maurice

What makes the wait? Are you running like some append queries in the
background before opening the forms?

I use the activeX progressbar which works pretty straight forward. It has a
min and max value setting. First I determine how many processes there are and
then increment the progressbar by 1.

So in case of some queries the example could look like this:

prgBar.min=0
prgbar.max=6 '-> this is the number of queries that needs to run

run the first query

prgBar=prgBar+1

run the next query

etc...

ofcourse you will make this dynamical when you proceed on using the
progressbar more. Reading recordset values to show progress of importing
things etc.

But to get back to the question again; which technique are you looking for
and what did you find already...
 
J

jas580

Hi Maurice,

The wait comes from the underlying queries running. Each tab has a chart.
Each chart is based on 2 queries. When I load the form it automatically
starts running all the queries and populating the charts in the background.

I understand the concept of your example but I don't know how to implement
it. I found the ActiveX control for the form and the min/max properties, but
how do I get it to run one query at a time and increment the prog bar? How
and where do I code all this?

Thanks for the help...

-jeff
 
M

Maurice

Jas,

Just to be clear, do you have any events in your OnLoad of the form that
triggers the queries? If you do then post the events so i can take a look at
it and push you in the right direction..
 
J

jas580

Maurice,

Nope- no events at all for the form. Just a pop-up form with the
aforementioned tabs and charts.

Thanks again...

-jeff
 
M

Maurice

Jas,

I get it. The queries are actually the sources of the different charts on
the tabs. As I read it the queries are being processed while the form is
being loaded. This is a hard taks to create a progressbar for because you
have to progress the speed of the processor which takes care of processing
the queries. Simply said you never know how fast the query will be processed
up front due to hardware issues.

I thought you had some appendqueries being processed before the actual form
is displayed. That's a proces you can tackle.

In your case I would just place a label on the form asking the user to be
patient while the chart is being processed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top