Disable shift key bypass

Your access database security matter is shift key bypass. For disable the shift key bypass follow the instructions.


  1. Make a new  module
  2. Paste the code

Public Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
' To re-enable shift bypass change the above line to True, hold down CTRL-G and in the ensuing window type
' Call SetBypassProperty
End Sub
Private Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Exit Function
If Err = conPropNotFoundError Then    ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function

  1. Save the module with a meaningful name. ex: offbypass
  2. Press from keyboard ctrl+G
  3. In the ensuing window that opens, type Call SetBypassProperty
  4. Close and save the module

Tags : , , ,

Share on :

Leave a Reply

five × = 30