Guus2005
07-06-2007, 04:58 AM
Works with Acc97 and higher.
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
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