Add two button to a form make them invisible place them somewhere no one would look.
Private Sub Command61_Click()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
MsgBox "System Lockdown, the shift key has been blocked"
DoCmd.Close
DoCmd.OpenForm "Autoexec", acNormal
End Sub
Private Sub Command62_Click()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
MsgBox "System open, the program is currently unlocked"
DoCmd.Close
DoCmd.OpenForm "Autoexec", acNormal
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.