How do I open a form with a timer event? (1 Viewer)

OBBurton

Registered User.
Local time
Yesterday, 22:36
Joined
Dec 26, 2013
Messages
77
Hi,
I've taken a break from Access for a while, but I'm back at it again and having some difficulty. I am trying to open a form with a timer to state that the database is going to shut down in five minutes if they don't respond. I'm obviously using the wrong code. I've been trying to use the following:
Private Sub Form_Timer()
DoCmd.OpenForm "frmWarning"
If Forms!frmHidden!chkActive Then
Forms!frmHidden!chkActive = False
Me.TimerInterval = 300000
Else
DoCmd.Quit
End If
End Sub

It crashes on the 'DoCmd.OpenForm "frmWarning"'
What do I need to do to accomplish this seemingly simple task?:confused:
 

JHB

Have been here a while
Local time
Today, 07:36
Joined
Jun 17, 2012
Messages
7,732
Are you able to open the form "frmWarning" from the Navigation pane?
 

OBBurton

Registered User.
Local time
Yesterday, 22:36
Joined
Dec 26, 2013
Messages
77
Yes it opens, just fine. But, your question got me thinking that I did not know if it would open with the main form open. Then I realized that the main form was set to modal. Of course, when I changed the modal property from Yes to No, everything worked as it was supposed to work. Thanks, for getting me thinking along the right lines!
 
Last edited:

Users who are viewing this thread

Top Bottom