create a splash screen.
put two buttons on the screen name them "Lock" and "Unlocked"
in the code for the unlock button put this code in the on click event:-
================================
Private Sub Command23_Click()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "AllowByPassKey"
MsgBox "Access!", vbExclamation
db.Properties.Refresh
End Sub
================================
in the code for the lock button put this code in the on click event:-
================================
Private Sub Command22_Click()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
MsgBox "No Access!", vbExclamation
db.Properties.Append prp
End Sub
================================
now set the buttons in a place only you know about and set there visible property to false.
that only you will know where they are.
Be ALERT - Your country needs Lerts