>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