The EccoItems Object

This object represents a collection of EccoItem objects, and includes powerful functions for finding specific items or creating a smaller collection based on filter criteria.

A particular item can be accessed using either its index number or the item text. For example, to return a single item representing the fifth item in the collection, you would use the following:

Set MyItem = MyCollection.Items(5)

Since you will usually not know the index of the item you are looking for without iterating through the entire collection, you can also use the item text as an index. For example,

Set MyItem = MyCollection.Items("Smith, John") 

Note that this requires you to exactly state the item text and may fail if the collection contains more than one item with the identical item text.

You can iterate through a collection of items using the following syntax:

Set MyItem = New EccoItem 
For Each MyItem in MyCollection 
    Debug.Print MyItem.Text, MyItem.BusPhone 
Next

The EccoItems object supports the following properties and methods:

Properties:

Count

Find

Item

PivotYear

Methods:

Add

Remove