Shift Holding

Vassago

Former Staff Turned AWF Retiree
Local time
Today, 08:58
Joined
Dec 26, 2002
Messages
4,748
Other than creating an MDE file, is there any other way to stop shift from overriding startup options in a database?
 
Here is some code that I found that will do it. I don't remember where I got it. (probably here!) Create an autoexec macro with a RunCode command:

Code:
Function ap_DisableShift()
On Error GoTo errDisableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

    Set db = CurrentDb()

    db.Properties("AllowByPassKey") = False

    Exit Function

errDisableShift:
    If Err = conPropNotFound Then
        Set prop = db.CreateProperty("AllowByPassKey", dbBoolean, False)
        db.Properties.Append prop
        Resume Next
    Else
        MsgBox "Function 'ap_DisableShift' did not complete successfully."
        Exit Function
    End If

End Function
 
That worked beautifully, thanks a lot!

:D
 

Users who are viewing this thread

Back
Top Bottom