Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO FORM MyForm TO uResult--Undefined Variable
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00264264
Message ID:
00264275
Views:
18
Paul,
Simply initialize the variable first, before the DO FORM..... command.
uResult = ''
do form MyForm to uResult
? type("uresult")
Be sure you put the return value in the Unload event of the modal form so it gets processed.

You might also consider assigning a character value to the returned variable and checking the value or to see if it is empty.

HTH
Barbara

>Hi:
>
>When I perform a DO FORM MyForm TO uResult AND I have a RETURN .F. in the Init of the form, I get a variable undefined as uResult.
>
>For example:
>
>DO FORM MyForm TO uResult
>? TYPE("uResult") && Returns "U"
>
>In my InInit:
>
>IF lCondition
> Thisform.ReturnValue = "1"
> RETURN .F.
>ENDIF
>
>In my Unload event I have:
>
>RETURN Thisform.ReturnValue
>
>I need to capture a return value to uResult and return a .f. in the Init. Can it be done?
>
>--Paul
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform