SitesMastec,
Is your child form Modal, or can you tolerate it being modal?
If you can then you can use the TO clause with DO FORM. You can pass parameters to the child form, and then get a return value IF you can tolerate that form being modal. If you need more than one value, there's ways to do that, but it's a little messy.
So from your parent form (I assume you click a button) in the CLICK event:
DO FORM <ChildForm> With <Parameters if you want to pass them... param1, param2, param3> TO lRetValue
In the child form, if you pass parameters, then you need in the INIT:
Code:
LPARAMETER <param1>, <param2>, <param3>...etc.
ADDPROPERTY(This,"lRetVal") && Used to hold a return value to the calling form
*
This.lRetVal = 0
That will add a property called lRetVal to store whatever value you are returning as a property of the form.
In your child form's UNLOAD event:
RETURN ThisForm.lRetVal
This value gets passed back to the calling form, and now lRetValue in that form that called it, has the value.
But for this to work with the TO clause, the child form must be modal. Not the end of the universe, you just can't click outside it to make it go away. But you can manage that in other ways...
Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS
"Everything should be made as simple as possible, and no simpler."
![[hammer] [hammer] [hammer]](/data/assets/smilies/hammer.gif)