You can use forms throughout your application to allow users to specify a value.
To return a value from a form
-
Set the WindowType Property of the form to 1 to make the form modal.
-
In the code associated with the Unload event of the form, include a RETURN Command with the return value.
-
In the program or method that runs the form, include the TO keyword in the DO FORM Command.
For example, if
FindCustIDis a modal form that returns a character value, the following line of code stores the return value to a variable namedcCustID:
Copy CodeDO FORM FindCustID TO cCustID
For more information, see RETURN Command and DO FORM Command.
Note |
|---|
|
If you get an error, make sure the WindowType is set to 1 (Modal). |
See Also
Tasks
How to: Pass Parameters to a FormReference
Unload EventRETURN Command
DO FORM Command
Note
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08