Try this. It should still work:
Public Function LockDB(blnLock As Boolean)
'====================================================================
' Name: LockDB
' Purpose: Kill the Shift key
'
' Inputs: blnLock As Boolean
'
' Author: Arvin Meyer
' Date: April 19, 1999
' Comment: If blnLock = 0, the bypass key is activated,
' If blnLock = -1, the bypass key is deactivated
' Keep a copy of the database without this property
'=================================================================
On Error GoTo Err_LockDB
Dim prp As Property
Const PropertyNotFound = 3270
CurrentDb.Properties("AllowBypassKey") = blnLock
Exit_LockDB:
Exit Function
Err_LockDB:
'Create the property if not found.
If Err = 3270 Then
Set prp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean,
blnLock)
CurrentDb.Properties.Append prp
Resume Next
Else
Resume Exit_LockDB
End If
End Function