>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
Put RETURN(THIS.ValueToReturn) in the UnLoad Event of the form.
*You can't return the Value property of an object on the form because the Destroy Event for all form objects has already occured.
*Put the value to be returned in a form property. (lika 'Tag')
The form's WindowType property needs to be set to 1-Modal.
Now that we've got the form built, we need to know how to call it. Call the form with:
DO FORM InputForm TO gcInput
InputForm is the name for the for and gcInput is where the value will be placed.