General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only