Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-28-2003, 12:13 PM   #1
spacepro
Registered User
 
spacepro's Avatar
 
Join Date: Jan 2003
Location: The Potteries , UK
Posts: 715
Thanks: 0
Thanked 2 Times in 1 Post
spacepro is on a distinguished road
Send a message via MSN to spacepro
Progress Bar ?

I have an orders form, when the required fields are filled in a msgbox with the order ref will pop up, what I would like to do is before the msgbox pops up , I want to open a form on the afterupdate of the last field entered, which isn't a problem.

The form that I open I want to put a progress bar onto the form, but when the form opens it starts the progress bar for a certain amount of time e.g.5 seconds, then the form closes and pops up the order ref in the msgbox.

Can anyone help me with a bit of code on how I attempt this.
I do have the progress bar on a form, but don't know how to intiate the progress bar.

Many Thanks
Andy

spacepro is offline   Reply With Quote
Old 02-28-2003, 01:10 PM   #2
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 12,271
Thanks: 62
Thanked 1,144 Times in 1,045 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Actually, I did this another way.

Create two rectangles of the same height and aligned with the same left edge and top edge. They can be either borderless or have a hairline border.

Make one have a background of one color and the other one a background of a different color. I chose to have one bar with a white background and the other with a bright green, but that was because it looked good on my form. I made the green one come on top (Format>>Move to Front). I called them FrontBar and BackBar. FrontBar moves, BackBar does not.

Now when you want to show a progress bar, make them both visible. Set the width of the one in front to 1. Never touch the width of the one that is behind the moving bar.

Code:
FrontBar.Width = 1
FrontBar.Visible = True
BackBar.Visible = True
Me.Repaint
Now, at critical points in your code, do a scaling operation based on the fraction of completion that you have.

Code:
FrontBar.Width = ( BackBar.Width * CurrentValue ) / MaxValue
Me.Repaint

When done, make them both invisible.

Code:
FrontBar.Visible = False
BackBar.Visible = False
Me.Repaint
The_Doc_Man is offline   Reply With Quote
Old 02-28-2003, 01:20 PM   #3
spacepro
Registered User
 
spacepro's Avatar
 
Join Date: Jan 2003
Location: The Potteries , UK
Posts: 715
Thanks: 0
Thanked 2 Times in 1 Post
spacepro is on a distinguished road
Send a message via MSN to spacepro
Hi Doc Man,
Thanks for your feedback , sorry to sound a bit daft, but I want a msgbox to appear after the progress bar as completed, because I need the user to see the order ref and then click ok to acknowledge the reference number.

I do apologise but could you explain what you have suggested in a little more detail.

Many Thanks
Andy

spacepro is offline   Reply With Quote
Old 02-28-2003, 02:54 PM   #4
spacepro
Registered User
 
spacepro's Avatar
 
Join Date: Jan 2003
Location: The Potteries , UK
Posts: 715
Thanks: 0
Thanked 2 Times in 1 Post
spacepro is on a distinguished road
Send a message via MSN to spacepro
Thanks Docman,

Done it.
Many Thanks
Andy

spacepro is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 12:03 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World