Executing a cmd button on load

Conoize23

Registered User.
Local time
Today, 12:54
Joined
May 27, 2016
Messages
15
Im trying to "click" a button after my form loads but Im not having any success

The button will start a progress bar from "loading", the form I want to load is a splash form. I've tried this...

First I declared the sub of me.cmdSTart public, like this :

Code:
Public Sub cmdStart_Click()

Then I can access the sub from anywhere and on the form load event of the splash screen I write this...but no luck, is this the correct method to do it?

Code:
Me.cmdStart_Click
 
The syntax is:
Code:
Call cmdStart_Click
 
yeah, it calls the button, but I want that the progress bar starts running like when I hit the cmd button, but still it doesn't run when I load the form...
 
create a timer event on your form:

TimerInterval=1000

private sub Form_Timer()
'kill the timer
Me.TimerInterval = 0
Call cmdStart_Click
end sub
 
thank you sir, it works like a charm! Now, remains, how do I open another form after the loader completed?

I tried this...But it doesn't do anything :/

Code:
Private Sub Form_Timer()
'kill the timer
Me.TimerInterval = 0
Me.lblCurrentTask.Visible = True
Me.imgProgress.Visible = True
Me.boxProgress.Visible = True
Call cmdStart_Click
If Me.TimerInterval = 1000 Then
DoCmd.OpenForm "Schedule", acDesign
End If
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom