This is perhaps not as elegant a solution but it works for me. I have a function that rifles thru the MDI childforms to find a prior instance like this:
VB Code:
' Check for previous instance of the child form and activate it if found, otherwise return False
Friend Function fCheckInstance(ByRef frmParent As Form, ByRef szChild As String) As Boolean
fCheckInstance = True
Dim frmInstanceCheck As Form
' See if the form is already open
For Each frmInstanceCheck In frmParent.MdiChildren
If frmInstanceCheck.Text = szChild Then
frmInstanceCheck.Activate()
Exit Function
End If
Next
fCheckInstance = False
End Function
I call it when the user attempts to open a child form thusly:
VB Code:
If Not fCheckInstance(Me, "MasterEdits") Then
Dim frm As New MasterEdits()
frm.MdiParent = Me
frm.Show()
End If