OK I've tested this out and it seems to work fine.
Fistly you will have to declare an integer variable outside of the forms events so it can remember its value. I've used i as the variable name and declared it just under Option Explicit. The variable needs to be initialised as soon as the form is opened so I've added a statement to the forms load event to initialise it to 1. Now in the forms On Timer Event I added a select case statement to rotate through 3 pictures. If there is anything you don't understand let me know.
Don't forget to set the time interval in the properties events list to whatever interval you want to use. e.g. 3000 for 3 seconds
Fistly you will have to declare an integer variable outside of the forms events so it can remember its value. I've used i as the variable name and declared it just under Option Explicit. The variable needs to be initialised as soon as the form is opened so I've added a statement to the forms load event to initialise it to 1. Now in the forms On Timer Event I added a select case statement to rotate through 3 pictures. If there is anything you don't understand let me know.
Don't forget to set the time interval in the properties events list to whatever interval you want to use. e.g. 3000 for 3 seconds
Code:
Option Compare Database
Option Explicit
Dim i As Integer
Private Sub Form_Load()
i = 1
End Sub
Private Sub Form_Timer()
'When the database is opened rotate 3 different images.
Dim path As String
path = "C:\Documents\"
Select Case i
Case 1
ShowImage Me.Image1, path & "MyPicture1.jpg"
Case 2
ShowImage Me.Image1, path & "MyPicture2.jpg"
Case 3
ShowImage Me.Image1, path & "MyPicture3.jpg"
End Select
If i = 3 Then
i = 1
Else
i = i + 1
End If
End Sub
Comment