Shift key protection not working

B

Bisha

This is very strange. I have used this code for disabling Shift Key to
bypass startup succesfully
but when i try it now it's not working. Please somebody help ...

This is the code I use .


Sub Protect()
Const DB_Boolean As Long = 1
ChangePropertyDdl "AllowBypassKey", DB_Boolean, False
End Sub


Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
On Error GoTo ChangePropertyDdl_Err
Dim db As DAO.Database
Dim prp As DAO.Property
Const conPropNotFoundError = 3270
Set db = CurrentDb
db.Properties.Delete stPropName
Set prp = db.CreateProperty(stPropName, _
PropType, vPropVal, True)
db.Properties.Append prp
ChangePropertyDdl = True

ChangePropertyDdl_Exit:
Set prp = Nothing
Set db = Nothing
Exit Function

ChangePropertyDdl_Err:
If Err.Number = conPropNotFoundError Then
Resume Next
End If
Resume ChangePropertyDdl_Exit
End Function
 

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

Similar Threads

disallowing SHIFT Bypass 8
Display Current State of AllowBypassKey 4
disable shift key 2
Bypassing Shift Key 1
AllowByPassKey 6
Shift Key 9
AllowByPassKey 1
Error 429 in Runtime 0

Top