I have 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 entered 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 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.
I appreciate any of help. Thanks in advance.
Firstly, The users who may entered 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 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.
I appreciate any of help. Thanks in advance.