I had a MS Access application that is used in multiuser environment. I want to make maintanence every thursday between 15:00 and 16:00. At this point I have two issues to consider.
Firstly, The users who may be entering to application before 15:00.
Secondly, the users who will be entering between 15:00-16:00
For the second scenario, I need to prevent my users to access the MS Access application. For this purpose, I have written the following code into the load event of my beginning form.
Private Sub Form_Load()
MsgBox "Between 15.00 and 16.00 on Thursdays access is not available due to maintenance", vbOKOnly*
DoCmd.CloseDatabase
End Sub
It worked in a way I would like. The only thing is now to restrict it to work between specific hours as I described. How can I integrate time parameter to my code?
And for first scenario, For all users in the system wherever they are, close database function should be working and Application should be closed automatically.
question from:
https://stackoverflow.com/questions/65868881/how-to-run-my-vba-code-between-specific-hours-for-each-week-in-ms-access-applica 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…