Happy new year All,
I created a small form and in the On timer event I added the following code to close the database at 12:00:00 automatically.
Time Interval = 1000
And added into the autoexec macro to open as a hidden form.
The code works fine.
But if the form is working in the background I cant delete any records and have other issues.
Please let me know what I can do.
Dim wTime As Date
wTime = Format("12:00:00 AM", "Short Time")
Me.Clock = Time
If Me.Clock = wTime Then DoCmd.Quit acQuitSaveAll