Sub KeepEmOut()
Dim db As Database
Dim pty As Property
On Error GoTo KeepEmOut_Err
Set db = CurrentDb
db.Properties("AllowBypassKey").Value = False
KeepEmOut_Exit:
Exit Sub
KeepEmOut_Err:
If Err.Number = 3270 Then
Set pty = db.CreateProperty("AllowBypassKey", dbBoolean, False)
db.Properties.Append pty
Else
Debug.Print Err.Description
Resume KeepEmOut_Exit
End If
End Sub
|