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.