I am trying to implement the solution given for this question:
However, nothing happens except the message box. One piece I was not sure about is where the expert says to "create a Class Module variable at the Form level". I've never created a class module and don't know how to do it at the form level. All I did was simply created a Class Module and added the line he recommended.
Option Compare Database
Dim vMsgSent As Variant
Here's my code in the OnTimer event for the open form:
Dim MyDB As Database
Dim MyRS As Recordset
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset("tblDBP
If MyRS("ShutDown") Then
If Not (vMsgSent) Then
vMsgSent = True
MsgBox "This application will automatically shutdown at " & Format(MyRS("ShutDownTime"
), "General Date") & ". Please exit NOW!!"
If Time() >= MyRS("ShutDownTime") Then