Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh an other form
Message
 
To
31/07/2003 08:07:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00815308
Message ID:
00815368
Views:
9
Thank you for your answer.
It was a good code example you gave me.
It did not only solved my problem in an easy way, it even made me understand a little more about referece handling.
/Kjell




>>Hallo
>>I hope someone can help me with a problem I have.
>>I have 2 forms open.
>>Form1 has a list of custumers and form2 has a field for an adress.
>>When Im choosing a custumer in form1, I want the adressfield in form2 to be refreshed with the correct adress.
>>
>>I have tried 'Form2.refresh' from form1, but I get the error "object form2 does not exist".
>>My question is: How can I do a refresh on form2 from form1, whitout loosing the focus from form1?
>>
>>Thanks in advance
>>/Kjell
>
>Kjell,
>You need a reference to form2. ie: Assuming form2 is instantiated from form1 :
>
>this.AddProperty('calledform',.null.)
>do form form2 name this.calledform
>
>Then you can access PEM of form2 like this :
>thisform.CalledForm.Refresh
>
>Or you might find the other form using _screen.forms. Assuming there are only 2 forms at that time you might do this :
>
>_screen.forms[2].refresh && Active form is always forms[1]
>
>PS: Toolbars also count as forms so I do not suggest trying to find via _screen.forms.
>
>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform