I have a dilemma. I want the AllowByPassKey property to be false when I distribute a Accde Front End. I have set this value in the immediate window using this:
Code:
CurrentProject.Properties.Add "AllowBypassKey", False
Then I close and reopen the database holding the Shift key down and it still allows the bypass. I went back to the Immediate window and check to see what the value of the AllowByPassKey property was and it return a 0.
Code:
?CurrentProject.Properties("AllowBypassKey").Value
0
which tells me Access remembered the value I gave it, but still allowed me to use it.
I also want to be able to turn this back on at my option, but this is not relevant till I am able to switch it off. For this experiment I have unchecked Display Navigation Pane which also displays when I hold down the shift key. I want this value to be set to false before any forms are opened.
I've even tried something like this in the default forms OnLoad event, but this accomplishes nothing.
Code:
If gblAgencyCode = "720" Then
CurrentProject.Properties.("AllowBypassKey") = True
Else
CurrentProject.Properties.("AllowBypassKey") = False
End If
I'm getting nowhere fast. Please show me the error of my ways.
Thanks in advance,
Paul