Hi Everybody

Palyanos

New member
Local time
Today, 08:07
Joined
Jun 17, 2017
Messages
2
I hope i am in the wright section. The problem that i am facing at the moment is that , the database that i am using at work needs not to be opened before 9:30 AM , does anybody have any ideea how to do that without an Autoexec Macro or Password?
Thnak you in advance.
 
Hi

You could run a procedure like this in the Form_Load event of your startup form

Code:
Sub CheckTime()

If Format(Now(), "hh:nn") < "09:30" Then
    MsgBox "This database cannot be used before 09:30AM", vbCritical, "Database not available"
    Application.Quit
End If

End Sub

Although you said not to do this, it could also be run from an autoexec macro.
If so, change it to a function and place code in a module
 

Users who are viewing this thread

Back
Top Bottom