>I have a VFP form that I would like to have return a value. I know that I can put RETURN (value) in the Unload event of the form, but what is the form calling syntax? With old .SPRs I just created a .PRG and called it like so:
>
>IF MyDialog() = 1
> ...
>ENDIF
>
>
>How do I do this with a VFP form?
>
>TIA
Hi,
Normally you use :
Do form
with to
If you need more than one return value than you would use an array as .
This requires your CalledForm be modal.
Another approach is :
Create one or more properties (or array) on calling form and call the other with :
Do form with
In the called form since you have a reference to CallingForm you can set properties of caller in many levels.
(This approach is like using Toolbars - You can change properties on Caller before return and interfere with it anyway you like).
If will use modeless than add the name parameter to be able to control CalledForm as well (ie: user clicks over Calling and you want the other be refreshed as well).
Cetin