Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_screen and forms
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00112065
Message ID:
00112067
Views:
23
>Hello all,
>
>Has anybody run into this, I'm starting a form from some code that is part of another form, the 2nd form gets some user input & does some processing then stores some data back into properties in the original form.
>
>At design time code in Form2 can refer to Form1 by name:
>
>i.e.
>
> isp_form.current_id = thisform.edit1.value
>
>but at run time the only way I can get it to work is:
>
> form_index=_screen.formcount
> For i = 1 To from_index
> If _screen.forms(i).name = "isp_form"
> f1_index = i
> Exit
> EndIf
> EndFor
> If f1_index
> _screen.forms(f1_index).current_id = Thisfrom.edit1.value
> EndIF
>
>The above code seems to work well but, I was just wondering why I can't call the from directly at run time?
>
>Thanks,
>
>Mike

You use one of possible ways to reference form. Another way is to provide object reference when you load a form:
Do Form myform NAME oApp.myform LINKED
and use this reference later on:
oApp.myform.property1=....
One more way (less universal) is to send object reference as parameter:
DO FORM myform WITH thisform
and use it within Myform only.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform