• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

On Timer Event

I have this code that I have created that I am trying to run on the timer event of the main form. It does not seem to work. Can somebody please look at this and see what I am doing wrong?
Private Sub MyTimer()
StartTime = conStartTime
EndTime = 4000
If Not IsLoaded("frmPPT") Then
    Do While EndTime > StartTime
        StartTime = StartTime + 1
        Select Case StartTime
            Case 30
            Case 90
            Case 4000
                DoCmd.OpenForm "frmPPT"
        End Select
End If
End Sub

I have
Dim StartTime As Single
Dim EndTime As Single
Private Const conStartTime = 1

in general declarations.
  • 2
  • 2
1 Solution

Set form properties.
On Timer event procedure.
Timer interval : 1000

Private Sub Form_Timer()
    ' code here, try and post feedback.
End Sub

mona4980Author Commented:
I have set the timer event as you stated. The deal is I need the timer to do two events. so that is why I made MyTimer. If i put the MyTimer in the event then it just loops and goes to do the  DoCmd.OpenForm "frmPPT". the first time through the loop it changes the image on the form as it is supposed to but not after it loops through again.
mona4980Author Commented:
I have solved the problem by opening a form hidden that opens the form with the image on it and I can use the initial forms timer event to go through the pics.
then on the hidden forms timer it will open the frmPPT. there is some code I put in frmPPT to go through the Powerpoint presentation one frame at a time and then when it is done to close.
"I have solved the problem "
Comments are just to help you solve the problem. They open ways for your excellence to shine!
Good luck!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now