B
BruceM
I have a database with a tabbed form. Sometimes when the user is on a tab
they need to see information on another, but without losing sight of the
information on the current tab. To help with that I have created some small
pop-up forms that show the information that is displayed on other tabs. In
some cases there could be three such pop-up forms open. This works OK, but
I would like to know the most efficient way of closing them when I navigate
to another record (I will ask you to accept that this is necessary). I
could do something like this in the form's Current event:
If CurrentProject.AllForms("FirstForm").IsLoaded Then
DoCmd.Close acForm, "FirstForm"
End If
If CurrentProject.AllForms("SecondForm").IsLoaded Then
DoCmd.Close acForm, "SecondForm"
End If
If CurrentProject.AllForms("ThirdForm").IsLoaded Then
DoCmd.Close acForm, "ThirdForm"
End If
Or I could just close the forms:
DoCmd.Close acForm, "FirstForm"
DoCmd.Close acForm, "SecondForm"
DoCmd.Close acForm, "ThirdForm"
Is there any advantage to testing whether they are open first? Is there a
more efficient way than I have described, or a better event than the Current
event?
they need to see information on another, but without losing sight of the
information on the current tab. To help with that I have created some small
pop-up forms that show the information that is displayed on other tabs. In
some cases there could be three such pop-up forms open. This works OK, but
I would like to know the most efficient way of closing them when I navigate
to another record (I will ask you to accept that this is necessary). I
could do something like this in the form's Current event:
If CurrentProject.AllForms("FirstForm").IsLoaded Then
DoCmd.Close acForm, "FirstForm"
End If
If CurrentProject.AllForms("SecondForm").IsLoaded Then
DoCmd.Close acForm, "SecondForm"
End If
If CurrentProject.AllForms("ThirdForm").IsLoaded Then
DoCmd.Close acForm, "ThirdForm"
End If
Or I could just close the forms:
DoCmd.Close acForm, "FirstForm"
DoCmd.Close acForm, "SecondForm"
DoCmd.Close acForm, "ThirdForm"
Is there any advantage to testing whether they are open first? Is there a
more efficient way than I have described, or a better event than the Current
event?