TrkRecords.Item (method)

method Item
Syntax: TrkRecord = object.Item ( Index )
Parameters:
Index As Variant -
Index is the element key value in the collection. The data type for the Index argument can be any of the following: string, long, integer, unsigned integer, and unsigned long as a Variant value. The valid numeric index ranges from 1 to the total number of TrkRecord objects in the collection.
Description:
If the Index is a string, it returns the TrkRecord object with the specified name. If no such object exists in the collection, the method returns Nothing.

If the Index is a number, the method returns the TrkRecord object from the given position in the collection. If the Index argument is greater than the number of items in the collection, or the collection is empty it returns Nothing.

Example 1:

For idx = 1 To oTrkRecords.Count
   Set oTrkRecord = oTrkRecords.Item(idx)
   If Not oTrkRecord Is Nothing Then
      ...
      ...
      ...
   Else
    'oTrkRecord does not exist....
   End If
Next idx

Example 2:

Dim oTrkRecords As Object
Dim oTrkRecord As Object

For Each oTrkRecord In oTrkRecords
   MsgBox oTrkRecords.ID
   ...
   ...
Next