Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Question
Message
From
29/05/1997 11:38:23
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00033739
Message ID:
00034064
Views:
43
>>>>>>>If I may, what is the rule for invoking forms within forms. More specificly when a form I created for the purpose of making a year choice and hitting ok is executed, the form shows up but control does not come to it but rather the next line in the program does.The rest of the app is still working correctly however.
>>>>>>
>>>>>>Make this form modal.
>>>>>
>>>>>How do you grab the value of a variable from a form and pass it back to a prior form or even one prior to that?
>>>>
>>>>1. You call modal form by
>>>>DO FORM ... TO retvalue
>>>>2. In modal form unload event you
>>>>RETURN retvalue
>>>>It's also a good idea to creat and use coustom property Form.Retvalue to handle this case.
>>>
>>>Edward,I chose your 1) method and it keeps returning .t. when I am looking for a data value not a logical.
>>
>>The idea is that you should fill retvalue in modal form with some variable you want to return back. For example, Destroy event contains:
>>this.retvalue=this.text1.value
>>and Unload event:
>>return this.retvalue
>
>I have a do case statement in the code section of this modal form which assigns a char value into the variable 'asort' depending on how they want to see the data sorted. Am trying to think how to invoke destroy event into this scheme.
>Does the variable have to have a name in the form formname.var?

Don't try to invoke Destroy, it will go automatically. The idea again is:
1. Create modal form property 'Retvalue'
2. Assign to this property the value you want to return from form. In you case you can just add one line:
Thisform.Retvalue=asort
in the same event where your case statement located (I don't know what event you use, but it doesn't matter).
3. Type
RETURN This.retvalue
in Form.Unload event
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform