Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transfer values from 1 form to another form!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00364132
Message ID:
00364164
Views:
21
>Hi all,
>
> My question here is how to display an object's value of 1 form on another form and these two forms are separated(not in a formset).
> I really need your help. Any ideas, suggestions will be appreciated.
>
> Jenny.
>
>

Jenny, you can add oOtherForm property to the form, and loop through _screen.forms collection to find the necessary form.

FOR EACH loForm in _screen.forms
IF loForm.name = "myOtherForm"
thisform.oOtherForm = loForm
EXIT
ENDIF
ENDFOR

Then you can address as:
thisform.oOtherForm.SomeControl.Value

Many frameworks have their own form manager class or array property in application object which keeps track of all running forms.

Or, if you use the NAME clause in DO FORM like:

DO FORM myform NAME FirstForm

then you can address it:
FirstForm.SomeControl.Value
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform