Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a procedure to a form
Message
From
04/12/1997 20:55:37
 
 
To
04/12/1997 20:28:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00063926
Message ID:
00063930
Views:
43
There are several ways to do it:

1. Make your procedure a function and return the wanted value in the RETURN of the function. From your form: cMyVar = MyFunction( cVar)
2. Call directly the modal form and use DO FORM ... TO ... Do you really need the procedure in between?
3. Call your procedure with a parameter by reference: DO MyProc WITH @cVar
and in your procedure cVar = cAnotherVar. Personnaly, I don't advise this way!

RETURN TO MASTER is not helpful here.

Vlad

>Hi! I have created a form with a command button. When the command button is clicked, a procedure is called that activates a modal form.
>The modal form returns a value to the procedure when closed.
>
>e.g. In the command button I have: do with cVAR
> In the procedure I have: do form with cVAR to cANOTHERVAR
>
>Is it possible to return that value from the procedure to the form that called the procedure? Will RETURN TO MASTER command be sufficient?
Previous
Reply
Map
View

Click here to load this message in the networking platform