0
0 1
I have a continuous subform (fsubEvents) that lists various patient
events that have been entered for each patient (a well-check visit, a
lab test, etc.).
When you click on an event, OnClick code opens a pop-up form showing
that event's information. When the user selects a different event from
the continuous subform, I'd like to close the currently open event
form (if there is one), and open the next relevant form.
Because each type of event has its own form, it's difficult to know
which form may have just been opened, so this won't work:
If IsLoaded("PopUpFormName") = True Then
DoCmd.Close acForm, "PopUpFormName"
End If
.... unless there's a way to find the name of the currently open popup
form and pass that to the IsLoaded argument. Or is there a better way
to address this?
Thank you for any suggestions.
events that have been entered for each patient (a well-check visit, a
lab test, etc.).
When you click on an event, OnClick code opens a pop-up form showing
that event's information. When the user selects a different event from
the continuous subform, I'd like to close the currently open event
form (if there is one), and open the next relevant form.
Because each type of event has its own form, it's difficult to know
which form may have just been opened, so this won't work:
If IsLoaded("PopUpFormName") = True Then
DoCmd.Close acForm, "PopUpFormName"
End If
.... unless there's a way to find the name of the currently open popup
form and pass that to the IsLoaded argument. Or is there a better way
to address this?
Thank you for any suggestions.