title: MS-Access Form Visible property is being inconsistent
body: <p>My company has recently upgraded from MS Access 2013 to MS Access 365. I have about 23 databases and only 2 of them are acting up. The following code is almost exactly the same in all databases except for what happens inside the IF statement.</p>
  <pre><code>Private Sub cmbSelectProf_AfterUpdate()
  
  gUName = [cmbSelectProf]
  Call globalOfficerInfoSelection
  
      
      gVCredit = Val(gCredit)
      gVAdmin = Val(gAdmin)
  
      If gVCredit = 33 Then
          DoCmd.OpenForm &quot;Main&quot;
          DoCmd.ApplyFilter &quot;UndQryCorp&quot;
          DoCmd.GoToRecord , , acNewRec
      Else
          MsgBox (&quot;You have not been given CDS Maker permission.  Please contact Credit Administration&quot;)
          Application.FollowHyperlink &quot;\\appsrv03\apps\CreditApplications\SwitchBoardMain2013_v2.accdb&quot;
          DoCmd.Quit
      End If
  
  Forms![officer switchboard].Visible = False
  End Sub
  </code></pre>
  <p>The issue comes at the very end when I try to hide the [officer switchboard]. Some databases it hides it and some it doesn't. If I Debug the VBA and step through the code it will hide it without me changing anything. Below is code of a database that the Visible property does work.</p>
  <pre><code>Private Sub cmbSelectProf_AfterUpdate()
  
  gUName = [cmbSelectProf]
  Call globalOfficerInfoSelection
  
      gVCredit = Val(gCredit)
      gVAdmin = Val(gAdmin)
      gVOfficerID = Val(gOfficerID)
  
      If gRM = 2 Then
          DoCmd.OpenForm &quot;CutMain&quot;
          DoCmd.ApplyFilter &quot;CutMainOfficer_filter&quot;
          DoCmd.GoToRecord acDataForm, &quot;CutMain&quot;, acNewRec
          DoCmd.GoToRecord acDataForm, &quot;CutMain&quot;, acNewRec
      Else
          DoCmd.OpenForm &quot;Cutmain&quot;
          DoCmd.GoToRecord acDataForm, &quot;CutMain&quot;, acNewRec
      End If
      
  Forms![officer switchboard].Visible = False
  
  End Sub
  </code></pre>