private FormSequence As New Collection
private currentForm As String 'Name of the open form
Private Sub Form_Open(Cancel As Integer)
'Add all your forms to the list
FormSequence.Add "frmOne"
FormSequence.Add "frmTwo"
FormSequence.Add "frmThree"
'Openfirst form
DoCmd.OpenForm "frmOne"
currentForm = "frmOne"
End Sub
Private Sub Form_Timer()
Dim frm As Access.Form
Dim currentFormOpen As Boolean
'need to set the timer interval to something other than 0
'Check to see if the current form is still open. If not open the next form
For Each frm In Forms
If frm.Name = currentForm Then
currentFormOpen = True
Exit For
End If
Next frm
If Not currentFormOpen Then OpenNextForm
End Sub
Public Sub OpenNextForm()
Dim frmName As String
If FormSequence.Count > 1 Then
FormSequence.Remove 1
frmName = FormSequence.Item(1)
currentForm = frmName
DoCmd.OpenForm (frmName)
Else
DoCmd.Close acForm, Me.Name
End If
End Sub