Form - with Progress Bar

G

Guest

Hi:

Can you please tell me if there is any easy way to display within a form, a
progress bar?

I have a report with selection criteria from a form; when more that one org
units are selected it takes a while to run; just to be 'nice' during this
time, idealy a form pops up to show a blue bar with the progress.

If it is too complicated... I will not do it.

Thanks in advance!

Dan
 
R

Rick Brandt

D said:
Hi:

Can you please tell me if there is any easy way to display within a
form, a progress bar?

I have a report with selection criteria from a form; when more that
one org units are selected it takes a while to run; just to be 'nice'
during this time, idealy a form pops up to show a blue bar with the
progress.

If it is too complicated... I will not do it.

Probably is. Progress bars show the progress of lots of small steps. Opening a
report is (to Access) one big step. So even if you did it the bar would sit at
zero until the report opened at which point it would jump to 100%.
 
G

Guest

Thanks Rick! is the below "viable"

****

So I create two rectangles. A larger one named boxProgressBar. A smaller
one called rectProgressBar just inside the the larger box. It's sized just a
bit smaller. Change the Back Colour of the front rectangle to whatever you
wish and the Back Style from Transparent to Normal. You might want to change
the Etched special effect of the front one to Flat.

Then change the following sample code to suit.

Dim intCurrentProgress As Integer
' This is the number of objects you expect to count which take some
' time to process. It likely won't be a constant in your environment.
Dim intTotalWidth As Integer
Const intProgressBarMax As Integer = 20

intTotalWidth = Me.boxProgressBar.Width

For intCurrentProgress = 1 To intProgressbarMax
Me.rectProgressBar.Width = (intTotalWidth / intProgressBarMax) *
intCurrentProgress
Me.Repaint
Next intCurrentProgress
 
A

Albert D. Kallal

The problem here is not writing some code that can display, and increment of
progress bar step by step as you propose. what you have to work fine, and
will produce a progress bar on the screen (actually, you'll likely need a
doevents command in the loop also update the display).

to probably going to have is you can run is looping code to increment the
progress bar when you launch the report you can go


a)

code to loop -> increment progess bar
launch rerpot (docmd.Openreprot)

or

b)

launch rerpot (docmd.Openreprot)
code to loop-> increment progess bar

bowl for the above approaches are useless to you, in the case of a), you'll
simply see the progress bar increment and complete, and **then** you you
will star waiting for the report.

In the case of b, you'll simply be waiting until the report loads and
finishes, and *then* you'll see your progress bar start.

perhaps I misunderstood your original question, and if you're doing some
kind of record set or data processing looped to build and create the data
for the report, then you can most certainly display that progress bar.
However, you don't have any ability to make the progress bar run while the
report is rendering.

So if you have like say a fifteen to 20 second delay (or more) before the
report loads where you have to process a bunch of data, and THEN launch the
reprot..then, yes, using a progress bar is a great idea....
 

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

Similar Threads

Strange progress bar behavior ! 3
Export to Excel with form Progress Bar 2
Progress Bar does not Finish 3
Progress BAR 2
Progress Bar Flicker 1
Progress Bar pattern 2
Progress bar 2
User Progress Box 4

Top