Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you access an object in a form from another form?
Message
From
13/11/1998 16:10:24
 
 
To
13/11/1998 16:05:46
Mark Kessler
U.S.M.C. - Network Operation Center
Quantico, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00157543
Message ID:
00157546
Views:
18
>How would you access a textbox on a form from anotherform or from a menu?

The simplest way is to loop through _SCREEN.Forms() collection.
FOR EACH oForm IN _SCREEN.Forms
 IF UPPER(oForm.Name)="MYFORM"
  oForm.Textbox1.SetFocus
 ENDIF
ENDFOR
Most of frameworks have special mechanism (form manager) to handle form and other application components without the above-mentioned way.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform