title: How can I create a new instance of a form class and then open it as a acDialog box (pausing other code)?
body: <h1>Problem</h1>
  
  <p>I have a complex search form that I need to open several times (at the same time) to allow users to do multiple searches at the same time. I have found the ability to open an instance of the form (as it is a class) using:</p>
  
  <pre><code>Option Compare Database
  Option Explicit
  
  'Array to hold Form Instances
  Private MyFormCollection(1 To 4) As Form_frmTest
  
  Private Sub cmd_CloneMe_Click()
      Dim intCounter As Integer
  
      For intCounter = 1 To 4
          Set MyFormCollection(intCounter) = New Form_frmTest
          MyFormCollection(intCounter).Caption = "Form #" &amp; intCounter
          MyFormCollection(intCounter).Visible = True
      Next intCounter
  
      Forms!frmTest.SetFocus
  End Sub
  </code></pre>
  
  <p><em>This is an example to open multiple instances of a form and not what I will use for the final code as I will only need to open one instant per click BUT will likely have other already open!</em></p>
  
  <p>BUT I can't work out a way to one of those duplicates as an acDialog (so calling function pauses until you hide or close the new dialog form). Here is the way I would normally open a normal form (not a copy):</p>
  
  <pre><code>Call DoCmd.OpenForm("SomeForm", acNormal, , , , acDialog)
  </code></pre>
  
  <hr>
  
  <h1>Question</h1>
  
  <p><strong>How can I open a new instance of a form as an Dialog box (so calling function pauses until new form is closed or hidden)?</strong></p>
  
  <p>Thanks</p>