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

Form Instances ARE kept in the forms collection

Status
Not open for further replies.

cavok

Programmer
Oct 3, 2001
3
AU
thread702-1475260
Hi,
The above thread was closed so I've started a new one.

In the above thread MajP stated that "All form instances share the same name and only the original instance is a member of the forms collection the Forms collection."

This is incorrect - each instance appears in the Forms collection with the same form name. You can manipulate the form through the Forms collection but you need something else, e.g. the Caption, to identify the individual instance if there is more than one.

This is handy when you want to update all instances of a form, for example. Just step through the Forms collection and update each one that uses the actual form name.

For Each F in Forms
If F.Name = "frmContact" Then
...
End If
Next

Garry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top