shift key

  • Thread starter Thread starter Cardo
  • Start date Start date
C

Cardo

How do you enable or disable the ability to open a MS
Access database holding down the left shift button for
table access mode?
Thanks
 
How do you enable or disable the ability to open a MS
Access database holding down the left shift button for
table access mode?
Thanks

In a VBA module execute the code:

Public Sub Lockout()
Dim db As DAO.Database
Dim prp As DAO.Property
Set db = CurrentDb
On Error Resume Next
db.Properties("AllowBypassKey") = False
If Err.Number = 3270 Then
Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False)
db.Properties.Append prp
End If
End Sub

Note that you should keep a copy of the database that is not locked;
it's possible to clear this property but it's tricky.
 
Back
Top