Here is my code to open multiple instances of the same form, but when I run it, it opens and closes the form.



I can step through the code and see it pops up and is visible and sets the filter correctly and sets the focus, but whenever it finishes that it closes for some reason.

Private Sub getrepairinfo()
On Error Resume Next
Dim strLinkCriteria As String
Dim form1 As Form

Call GetFilterCode.setfilter("Yes")

'DoCmd.OpenForm "frmrepair"

strLinkCriteria = "[Repair_ID] = " & Me![Repair ID]

Set form1 = New Form_frmrepair

With form1
'.filter = ""
.filter = strLinkCriteria
.FilterOn = True
.Visible = True
.SetFocus
End With

End Sub