Set/Create AllowByPassKey property (1 Viewer)

Status
Not open for further replies.

Guus2005

AWF VIP
Local time
Today, 13:30
Joined
Jun 26, 2007
Messages
2,645
Works with Acc97 and higher.
Code:
Public Sub AllowBypass(blnAllowByPass As Boolean)
'Procedure to prevent users from bypassing the AutoExec macro during startup.
    
    Dim prp As Property
    
    On Error GoTo Err_AllowBypass
    CurrentDb.Properties("AllowByPassKey") = blnAllowByPass
    
    Exit Sub
Err_AllowBypass:
    Set prp = CurrentDb.CreateProperty("AllowByPassKey", dbBoolean, False)
    CurrentDb.Properties.Append prp
    Resume Next

End Sub
No, it is not mine. It is ancient code. I found it on the net years ago.
U like?

HTH
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom