title: Enable AllowBypassKey based off password
body: <p>I have a created a database that has the AllowBypassKey shift key disabled. What I am trying to do is have a hidden box that when double clicked on pops up a box where the user must enter the password and then the AllowBypassKey is enabled. I have added the code I have written so far but I am getting a "Sub or Function not defined" for the SetProperties portion. I have shown the disable AllowBypassKey code as well.</p>
  
  <p>Disable Bypass code:</p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code>Function ap_DisableShift()
  On Error GoTo errDisableShift
  
  Dim db As DAO.Database
  Dim prop As DAO.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
  </code></pre>
  
  <p>Double-Click Code (Error popping up!)</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub Secret_DblClick(Cancel As Integer)
  On Error GoTo Err_bDisableBypassKey_Click
  Dim strInput As String
  Dim strMsg As String
  Beep
  strMsg = "Do you want to enable the Bypass Key"
  strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")
  If strInput = "PASSWORD" Then
  SetProperties "AllowBypassKey", dbBoolean, True
  Beep
  MsgBox "The Bypass Key has been enabled."
  Else
  Beep
  SetProperties "AllowBypassKey", dbBoolean, False
  MsgBox "Incorrect ''AllowBypassKey'' Password!"
  Exit Sub
  End If
  Exit_bDisableBypassKey_Click:
  Exit Sub
  Err_bDisableBypassKey_Click:
  MsgBox "bDisableBypassKey_Click", Err.Number, Err.Description
  Resume Exit_bDisableBypassKey_Click
  End Sub
  </code></pre>