Private Sub bDisableBypassKey_Click() *** On click code stops and highlights this in YELLOW
On Error GoTo Err_bDisableBypassKey_Click
'This ensures the user is the programmer needing to disable the Bypass Key
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & _
"Please key the programmer's password to enable the Bypass Key."
strInput = InputBox(Prompt:=strMsg, title:="Disable Bypass Key Password")
'**** ENTER YOUR PASSWORD HERE *****
If strInput = "MyPassWord" Then
SetProperties "AllowBypassKey", dbBoolean, True
Beep
**** RECIEVE A "COMPILE: SYNTAX ERROR" POP-UP WITH THIS MSGBOX TEXT HIGHLIGHTED
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
"The Shift key will allow the users to bypass the startup" & _
"options the next time the database is opened.", _
vbInformation, "Set Startup Properties"
******
Else
Beep
SetProperties "AllowBypassKey", dbBoolean, False
MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & _
"The Bypass Key was disabled." & vbCrLf & vbLf & _
"The Shift key will NOT allow the users to bypass the & _
startup options the next time the database is opened.", _
vbCritical, "Invalid Password"
Exit Sub
End Sub
|