Progress Bars Or Processing while a long task is running

G

Guest

I have an app that has several reports that take a while to format before
they are displayed/printed. I have seen several progress bars and other items
that could be used to indicate that something is being done. All this is ok,
but all of the items I have seen on-line requires me to define an upper limit
or other maximum number to be defined ahead of time. Well, I don't know how
long the wait will be. I need something to be displayed that will show the
user processing is being done. Here is the senario I am thinking about:

1. User clicks a button and the report is started
2. In the code, the progress bar or "processing - please wait" is displayed.
3. The progress bar continues to be displayed
4. Only when the report is completed formatting will the progress bar be
taken down.

I hope this makes sense. Thank you.

Ed Cohen | (e-mail address removed)
 
D

Dirk Goldgar

In
Ed Cohen said:
I have an app that has several reports that take a while to format
before they are displayed/printed. I have seen several progress bars
and other items that could be used to indicate that something is
being done. All this is ok, but all of the items I have seen on-line
requires me to define an upper limit or other maximum number to be
defined ahead of time. Well, I don't know how long the wait will be.
I need something to be displayed that will show the user processing
is being done. Here is the senario I am thinking about:

1. User clicks a button and the report is started
2. In the code, the progress bar or "processing - please wait" is
displayed.
3. The progress bar continues to be displayed
4. Only when the report is completed formatting will the progress bar
be taken down.

I hope this makes sense. Thank you.

A progress bar, pretty much by definition, displays progress relative to
completion. So for that, you need to know in advance what would
constitute completion, and have some incremental step you can identify
that will let you know how much closer to that goal you've come. If you
can't do that, then a progress bar isn't really in the cards. Bear in
mind that sometimes you can, through experience, define an estimated
time to completion, and use that along with a form's Timer event to
display a "pseudo-progress" bar -- the progress to completion is only
estimated and can be wildly wrong under some circumstances, but it gives
the user a (possibly false) sense progress. I really don't like that
idea, but you can do it.

What would be better in this case is to display a popup form with the
legend "Please wait ..." when you kick off the long-running process, and
turn the mouse pointer to an hourglass (DoCmd.Hourglass True). Then,
when the process is done -- you need to identify the appropriate event
for that -- you close the form and reset the mouse pointer
(DoCmd.Hourglass False). For a report, the completion event may be the
report's Close event.
 

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