Form Progress Bar

fenhow

Registered User.
Local time
Today, 08:55
Joined
Jul 21, 2004
Messages
599
Hi,

I have a form "Connect" with a progress bar which works perfectly until I do this.

I have another form called "Load" it is set to load full screen, DoCmd.Maximize, Pop Up Yes Modal No.

Once the form "Load" is up I call the other form "Connect" from the onload event of the form "Load" and it "Connect" comes up in front of the "Load Form" it "Connect" is Pop Up No, Modal No.

The ontimer event is suppose to run the progress bar and then open the Swithboard and close both the "Load" and "Connect" Form. This all works
execpt;

My progress bar does not run....

Any ideas?

Thanks.

Fen
 
You may need to add DoEvents into the timer this should solve that problem.

Mick
 
Thanks,

Here is the code for the progress bar, can you show me where I add the DoEvents?

Thanks.

Option Compare Database
Option Explicit
Dim l As Long
Dim lbarlnth As Long
Private Const UIOpacity As Integer = 175
'Alter value below to change speed
Const Steplth = 15

Private Sub Form_Load()
On Error GoTo Err_Form_Load
'// load the form in full transparent mode
Call SetTranslucent(Me.hWnd, 0)
'// ensure the form is visible for proper fade effect
'// (thought still full transparent)
Me.Visible = True
'// process fade in effect and provide the opacity value
'// not to exceed 255
Call UIProcessFadeIn(Me, UIOpacity)

lbarlnth = Me.Box21.Width - 30
l = 0

Exit_Form_Load:
Exit Sub

Err_Form_Load:
MsgBox Err.Description
Resume Exit_Form_Load
End Sub

Private Sub Form_Open(Cancel As Integer)
With Me
'// retrieve and display general info
.txtMachineName = Environ("computerName")
.txtUserName = Environ("userName")
.txtTimeIn = Time()
.txtCurrentTime = Time()
End With
End Sub

Private Sub Form_Timer()
On Error GoTo Err_Form_Timer

Do Until l >= lbarlnth
Call RunProgressBar(l)
l = l + Steplth
Pause 0.01
Loop

Pause 2


DoCmd.Close acForm, Me.Name

Call CheckLinks
Call RelinkTables

DoCmd.OpenForm "frmLogOn"
DoCmd.Close acForm, "Load"

Exit_Form_Timer:
Exit Sub

Err_Form_Timer:
MsgBox Err.Description, , " Error"
Resume Exit_Form_Timer

End Sub
 
Do Until l >= lbarlnth
DoEvents
Call RunProgressBar(l)
l = l + Steplth
Pause 0.01
Loop
 

Users who are viewing this thread

Back
Top Bottom