Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bar when opening a complex report

Status
Not open for further replies.
Nov 6, 2002
89
CH
Hi

I would like to implement a simple progress bar when opening a report which may take a while (up to 2 minutes).

I found some samples online but however, I don't find them clear for me. I still don' know how to create such a progress bar.

Can someone indicate me a webpage which explains how to create a command bar (explanation in simple way!!) or can you maybe explain this to me (which code, where to put the code, etc.).

Many thanks.

Stefan



 
Stefan,

First you'll have to add a Active ProgressBar Control. This control should be in your access controls. (mscomctl.cx)

Set the minimum and maximum of the progressbar.
Code:
Me.ProgressBar.Max = NoOfRecords
Me.ProgressBar.Min = 0
me.prograssBar = Me.ProgressBar.Min
Create a loop that determines the current position in your complete procedure. And return the value to the progressbar control. Then do a repaint of your form.

Hope this helps!
Good Luck!
Ami D. Shroyer, MCP
amidenise@yahoo.com
 
FYI, there's a typo in the last line of the properties that I didn't catch until after the post (naturally).

Here's the corrected version:

Code:
Me.ProgressBar.Max = NoOfRecords
Me.ProgressBar.Min = 0
Me.ProgressBar = Me.ProgressBar.Min

Again, hope this helps! Good Luck!
Ami D. Shroyer, MCP
amidenise@yahoo.com
 
Hello Ami

Thanks so much for your help.

Could you give me some sample code of the loop including the repaint, etc.?

Also I would like to know where I need to add the codes (the code above and the loop/repaint code).

Regards,

Stefan
 
I tried to implement a loop (with some other sides on this forum) into my form but I just couldn't due to a lack of experience/knowledge.

I have the following on my form, where the activeX Progress Bar should be included:

- 1 main form
- 1 subform
- 1 other subform (this subform has just informative information for the user)
- 1 command button (opening the report on which the activeX Progress Bar should be based on to show the progress of opening the report)
- The report should only be shown as soon as the ActiveX Progress Bar is fully shown.

Can anyone please help me with the following:

which codes (if possible with a sample) have to be addes where on the form. Im am really lost on this issue.

Thank you and kind regards,

Stefan



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top