Active X progress bar

wizcow

Registered User.
Local time
Today, 10:23
Joined
Sep 22, 2001
Messages
236
I have a splash form that opens for two minutes when my database opens.

I want a progress bar on the form to be zero when the forms opens and fill to be full when the splash form closes.

I have put an active x progress bar on the form but I have no idea how to make it work.

help

Tom
 
Why in the world would you have a splash form displayed for a whole two minutes? This I gotta know. What is the program doing while it is being displayed. This could determine how you deal with your progress bar.
 
Sorry Bob.
Typo, the form is open for two seconds.
The form isn't doing anything except looking good.
Its all about looks.
What I want is for the progress bar to fill while timing out the form. It should appear as though something is being loaded.
How do I do this?

Tom
 
Okay, here you go.

We're going to make it appear for about 4 seconds to give it time to work.

Set the form's Timer Interval at 40 and set the Maximum of the progress bar to 4000.

Substitute the progress bar name in the code below for mine or rename yours to mine (ctlProgBar). And substitute the actual form name for mine (Form1), and then you can add the code to open whatever form you want to open after the splash.

In the form's On Timer event put this code:

Private Sub Form_Timer()
Static intCount As Integer

intCount = intCount + 40
ctlProgBar.Value = intCount

If intCount = 4000 Then
DoCmd.Close acForm, "Form1", acSaveNo
End If

End Sub


That should get you going.
 
Sorry for bumping this rather old topic, but I finally found a solution to this problem, so I figured, let's share!

To adjust values of an ActiveX-control you can do the following (e.g. a progress bar):
Code:
pbProgress.Value = 0
pbProgress.Object.Min = 0
pbProgress.Object.Max = 10
pbProgress.Value = pbProgress.Value + 1
The available values are shown in the 'Other' tab of your object's properties. Check here too: http://msdn.microsoft.com/en-us/library/office/aa221581(v=office.11).aspx (bottom of page).
 

Users who are viewing this thread

Back
Top Bottom