title: MS Access “Compile Error: Label not defined” - Register Form
body: <p>Can anyone tell me why am I getting a compile error, I really can't work it out.</p>
  
  <p>I am doing a register form in MS Access.</p>
  
  <pre><code>Option Compare Database
  
  Private Sub Command61_Click()
  On Error GoTo ErrHandler:
  If IsNull(UserID) Then
      MsgBox "You have not entered information", , "Error"
  ElseIf IsNull(UserName) Or IsNull(Password) Then
      MsgBox "The user name and password fields are requiered", , "Error"
  Else
      msg = "Do you want to sumbit your information"
      Style = vbYesNo + vbCritical
      Title = "Registration Confirmed"
      response = MsgBox(msg, Style, Title)
      If response = vbYes Then
          DoCmd.Close
          Exit Sub
      End If
      If response = vbNo Then
          Me.Undo
          DoCmd.Close
          Exit Sub
      End If
  End If
  Exit_ErrHandlers:
  Exit Sub
  ErrHandlers:
      MsgBox Err.Description, vbCritical
      Err.Clear
  End Sub
  
  Private Sub Command62_Click()
  Me.Undo
  DoCmd.Close
  End Sub
  </code></pre>
  
  <p>I hope somebody will help me.</p>
  
  <p>Thanks.</p>