Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multipe Forms

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
I want to reference another form from the currently active one. However, I release I must have it loaded before I can do this, what is the syntax for doing this. So far I only know how to show and hide forms.


Garbh Ma Agat
(Thank You)

FoxStudent
Ireland [sig][/sig]
 
However, I release I must have it loaded before I can do this

Not sure exactly what you mean, but if you are asking how to you refer to a form:

when the second form is called from the first form
Say a command button on Form1 calls Form2:
[tt]do form Form2 name MyVar linked[/tt]
you can use MyVar to refer to it.

when the second form is instantiated from a class
[tt]oForm2 = CreateObject("MyFormClass")[/tt]

when the second form already exists, and was not created by the first form
Tricky. If you have a custom application object, you could store references to forms there, or you could use the _screen.Forms collection to find the form you are interested in and retrieve the object reference there.
[sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top