shift key

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
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top