If you simply need a visual check (you didn't state whether you wanted to determine if a form was open visually, or programmatically) by setting the MdiList property of a menu item--this causes the form to display a list of open child windows, with the current one "checked" in the list.
You can tell if there are <b>any</b> MDI children open by comparing the length of the MdiChildren collection property to 0, as shown earlier. If you want to determine which windows are loaded, you can write code something like this: Dim frm As Form For Each frm In Me.MdiChildren Debug.WriteLine(frm.Name) Next If you want to determine if a particular child form is loaded, you can use code something like this (which determines if an instance of the Form3 class is currently loaded): Dim frm As Form For Each frm In Me.MdiChildren If TypeOf frm Is Form3 Then Debug.WriteLine("Found a form3") End If Next
How do you tell if an mdi child is open
Esquif
Andrew34Fisher
You can tell if there are <b>any</b> MDI children open by comparing the length of the MdiChildren collection property to 0, as shown earlier. If you want to determine which windows are loaded, you can write code something like this:
Dim frm As Form
For Each frm In Me.MdiChildren
Debug.WriteLine(frm.Name)
Next
If you want to determine if a particular child form is loaded, you can use code something like this (which determines if an instance of the Form3 class is currently loaded):
Dim frm As Form
For Each frm In Me.MdiChildren
If TypeOf frm Is Form3 Then
Debug.WriteLine("Found a form3")
End If
Next
RafaMiranda
ks2006
Tony Steele