At 10:03 AM -0700 5/3/99, Fawcett, Mitch wrote:
>If I have two form event handlers one for FormX and one for FormY. FormX
>opens FormY. FormY does some things and then does a FrmReturnToForm making
>FormX the active form again.
>
>My question is, what's the situation with the statements following the
>FrmReturnToForm in the FormYHandler routine? Does it make sense to have
>anything following a FrmReturnToForm if processing is being transferred back
>to the event handler for FormX?
After the call to FrmReturnToForm, FormY will have been erased and deleted,
and FormX will be the active form.
You can certainly execute code after the call, but if it tries to do
anything with FormY it will generate an error. FormY is dead after the
FrmReturnToForm call.
Note that FrmReturnToForm will not open a new form. If the "destination"
form wasn't already open, it won't work. In that case, you should use
FrmGotoForm, which closes the current form and opens the target form.
I think Samir's workaround re: FrmReturnToForm not generating some events
isn't very good. If one particular form is generating "Form Already
Loaded" errors when FrmGotoForm tries to goto it, that's because it wasn't
properly closed/erased/deleted when it was exited last time. The closing
problem should be addressed instead.
--Bob