Add | |
Syntax: | TrkItem = object.Add ( bstrID ) |
Parameters: |
bstrID As
String -
Tracker Item ID |
Description: | Adds a new TrkItem objects to the TrkItems Collection. Example: Dim oTADBRoot As Object Dim oTrkItem As Object Set oTADBRoot = CreateObject("TADB.TADBRoot") If oTADBRoot Is Nothing Then MsgBox "Root Object is not
created" End If oTADBRoot.Load "TRK7", "" oTADBRoot.TrkItems.ReadDB "AnyItemID" If oTADBRoot.TrkItems.Count > 0 Then 'This means the Database contains records matching
"AnyItemID". 'All the records that match "AnyItemID" are returned as
TrkItem objects in TrkItems Collection 'Use TrkItem methods to manipulate the individual TrkItem
objects in the collection. Else Set oTrkItem =
oTADBRoot.TrkItems.Add("AnyItemID") If Not oTrkItem Is Nothing
Then oTrkItem.ReferenceID
= "ItemRefID" oTrkItem.ItemTypeID
= "ItemTypeID" oTrkItem.Save
'Add the item to the database. Else MsgBox
"Error adding the item in Items collection.". End If End If |