Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return some values from child form to Parent form
Message
From
05/06/2014 01:57:40
 
 
To
04/06/2014 22:50:07
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01601322
Message ID:
01601330
Views:
32
>Hi,
>
>How to return a value or some values from the child form to parent form ?
>for example
>I want to return the no. of invoice line item from the child form back to the parent form (Invoice header)
>when the child form close.
>
>Please advise,
>
>Thanks,
>
>Derek Yim

If the child form is a modal form, then you can do the following:

When launching the child form, you could use:
DO FormName WITH param1,param2,...paramn TO xRetVal
where the variable xRetVal will be assigned the value returned by child form.

If you don't need to pass parameters to child form, you can omit the WITH and the parameter list.

If you do pass parameters to the child form, make sure you have a PARAMETERS statement at the first line of the INIT() of the child form.

in the Unload of the child form
RETURN (somevalue)
where (somevalue) is the value you want to return to parent form.
Previous
Reply
Map
View

Click here to load this message in the networking platform