MackMan
Registered User.
- Local time
- Today, 17:05
- Joined
- Nov 25, 2014
- Messages
- 174
Hi Guys.
I will try to explain as best as I can so please bare with me.
I have two subforms in a tab formation sitting on a main form.
They can both open up a single popup form (via a button) and that popup form is opened via openargs with the autoID field.
What I need to do is pass back a value on the popup forms [On Unload] event to the subform which opened it.
As the popup form is Modal, the subform which opened it can't be changed.
Am I right in thinking I can pass back the value to the form which had previous focus?
If so, I would appreciate some help with it's code.
Previously, to pass a value from a popup form to a single form I've been using
But in this instance, how do I code the On Unload event in which to tell Access which form opened up the popup form, and pass a value back to it?
I'm guessing
Screen.PreviousControl.SetFocus
has something to do with it?
As always, Appreciate your help and patience.
I will try to explain as best as I can so please bare with me.
I have two subforms in a tab formation sitting on a main form.
They can both open up a single popup form (via a button) and that popup form is opened via openargs with the autoID field.
What I need to do is pass back a value on the popup forms [On Unload] event to the subform which opened it.
As the popup form is Modal, the subform which opened it can't be changed.
Am I right in thinking I can pass back the value to the form which had previous focus?
If so, I would appreciate some help with it's code.
Previously, to pass a value from a popup form to a single form I've been using
Code:
If CurrentProject.AllForms("MyForm").IsLoaded Then
do this
else do this
end if
I'm guessing
Screen.PreviousControl.SetFocus
has something to do with it?
As always, Appreciate your help and patience.