title: form_load subroutine in MS Access VBA
body: <p>I am writing a code in MS Access VBA, which is as follows:</p>
  
  <pre><code>Private Sub Form_Load()
      MsgBox "loggedIn = " + CStr(loggedIn)
      If (loggedIn = 1) Then
      Else
          Exit Sub
      End If
  End Sub
  </code></pre>
  
  <p>I want to decide whether to load the form or not based on <code>loggedIn</code> variable. If <code>loggedIn</code> variable is 1, form shall be loaded. If the same is not 1, form shall not be loaded. </p>
  
  <p>Issue that I am facing is that, whatever I do in ELSE part of the code above, I am not able to stop the form from loading. </p>
  
  <p>How can I achieve this?</p>
  
  <p>Pls comment if any additional information is required. </p>
  
  <p>Thank you. </p>