#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    101
    Rep Power
    4

    How many test form is open ?


    I suppose there are many programs of the form, I can determine how much the order form is opened and the name of the form is not open? Who can share me with example, thanks
  2. #2
  3. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    I don't understand your question, sorry.
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    14
    Rep Power
    0
    I'm guessing he wants to be able to determine/identify which forms within his running program are open and which are not?

    The following should tell you which are open and, by elimination, which are not.

    Dim frm As Form
    For Each frm In Forms
    If frm.Name > "" Then
    debug.print frm.Name & " is open"
    End If
    Next

    If he meant something else then
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    101
    Rep Power
    4
    1. form that is open can have a number of these?

    2. closed form series open with error
    For Each frm In Forms
    If frm.Name <> Me.Name Then
    If frm.MDIChild = True Then
    MDIMainForm.RemoveChild frm.Name ' Error here
    End If
    End If
    Next
    Set frm = Nothing
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    101
    Rep Power
    4
    if I use Unload the following Unload I have must to put the correct name of FormChild. eg MDIForm have Form1, Form2, ... Formn:

    Unload Form1
    Unload Form2
    ...
    Unload Formn


    Now, I want to replace the code above with:

    Dim frm As Form
    ' Close many FormRemoveChild
    For Each frm In Forms
    If Me.Name <> frm.Name Then ' Me.Name is MDIForm and frm.Name is Form1, Form2, ...., Formn
    Unload frm.Name ' Error here
    End If
    Next
    Set frm = Nothing

    What should I do ?

IMN logo majestic logo threadwatch logo seochat tools logo