Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return multiple values from a form
Message
From
24/03/1997 16:19:33
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00025415
Message ID:
00025449
Views:
29
>>How can I return more than one value from a form? Instead of
>>
>>DO FORM
TO retval
>>
>>I would like to
>>
>>DO FORM TO retval1, retval2, etc.
>>
>>I tried returning an array but only the first array item was returned.
>>
>>Thanks,
>>Ross
>
>You can use a public array and fill it in your form.
>No parameters, no returned values!
>
>BTW Your form must be MODAL. :-]

You're right - the form must be modal to use the TO clause, but there is an OOP way to do this. DEFINE an object that holds the variables you wish to pass back, then pass the object in using the WITH clause. Alter the properties in the object appropriately, then release the modal form. You don't even need the TO clause at that point, though I tend to use it as a logical to indicate whether the object was correctly updated.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Reply
Map
View

Click here to load this message in the networking platform