I'm running the following code in the timer event section when my database opens. It works on the my Office 365 version, but doesn't seem to fire on the run-time version of access. My database is on a network in a FE/BE setup. There is a yes/No box in my table called "ztblSystemStat us". When I uncheck this box and close out the timer should run out and this code should run and close out the front end's that I have out on the manufacturing floor which use access run-time. I have let it sit for over 5 mins on a 1 minute timer(60000 milliseconds). When it works correctly it pops up a popup form with a message that the database is going down for maintenance in 10 secs....but nothing happens. I open mine and sure enough after 1 minute the message pops up and then closes 10 secs. later. Any idea on how I can get runtime to work with this setp?
Code:
Private Sub Form_Timer() 'Checks system status Dim varRetVal varRetVal = DLookup("SystemUP", "ztblSystemStatus") If Nz(varRetVal, 0) = 0 Then DoCmd.OpenForm "frmSystemExit", acNormal End If End Sub
Comment