Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh an other form
Message
From
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:
00815322
Views:
8
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform