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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Instance Of Form and Referring to it by Name

Status
Not open for further replies.

webuser

MIS
Jun 1, 2001
202
US
I have an application that uses multiple instances of a form, so I instantiate it using

Dim MyForm2 As New Form_MyForm

When I try to refer to the form by name
(i.e Forms("FormName").Name it does not work.

MyForm2.Name does work and returns the name of the form, as does forms(3).name, i.e using the index but like I said, forms("FormName").Name does not work.

I guess it makes sense because how do you refer to multiple instances by the same name, but is there a way I can do this using some sort of incrementer, such as
Forms("FormName" & x).name?

Any help would be greatly appreciated! Thanks in advance!




 
Perhaps this ?
Form_MyForm2.Name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks. But yes, I know that works. I specifically need to be able to do this:

Forms("MyFormName").Name

I need to be able to use the name of the form...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top