Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing data back and forth two forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00059427
Message ID:
00059448
Views:
35
>I have a question on passing data. I have two forms opened simultaneously.
>However, these two forms are not grouped into a form set. I would like
>to know whether there is any way I can pass the data (the input of a text
>box) to a text box on another form directly. Thanks in advance.
>
>
>C.L. Chu

There are several ways to do it. The easiest is to place the data from one form into a form property of the other form.

If Form2 is always opened from Form1 (never opened first) then you can pass the object reference to form1 in a parameter to the INIT of Form2 and store it into a property of Form2.
** Call Form2 from Form1 with the form object name
DO form Form2 with thisform

** In Form2 INIT save this value
parameters CallingForm_o
thisform.CallingForm = Callingform_o

** Anywhere on Form2 pop your data back into Form1
Thisform.CallingForm.MyProperty1 = This.value  && THIS being a control
If either form can be opened first, then you will probably have to use the NAME clause in your DO FORM.... code. Check how this works in the Help system. Basically, you would call each form with
DO FORM Form1 NAME FORM1 LINKED and
DO FORM Form2 NAME FORM2 LINKED

You could then use the FORM1 and FORM2 names just as I did in the first code.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform