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

Refering to certain instance of a form in a collection

Status
Not open for further replies.

jwhearn

Programmer
Feb 2, 2001
7
US
Does anyone know what my problem might be?
I am trying to refer to a certain instance of a form that I've added to a collection. I am adding several instances of the same form to a Collection object called colForms, then trying to access the information on them from a different module.

In the form-module which creates the instances, I first declare colForms (in the declarations section) like this:

Code:
Public colForms As New Collection

Then the code (in this same form-module) that creates the multiple instances of the form, "frmInventory Entry Form", looks like this:

Code:
Set frmSearchResultsFV = New [Form_frmInventory Entry Form]
colForms.Add frmSearchResultsFV

The form instances are being created just fine, and I can access colForms' properties (count, index, etc.) just fine in this module, but I can not access them at all from any other module, even though I have declared colForms as a Public Collection object.

Any thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top