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.
Thanks
Dim wTime As Date
wTime = Format("12:00:00 AM", "Short Time")
Me.Clock = Time
If Me.Clock = wTime Then DoCmd.Quit acQuitSaveAll
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.