S
Slonocode
I have a collection of objects in a hashtable.
The objects have a datamember that is empty.
I need to loop through the items in the hashtable and add data to the
datamember that is empty.
htShippingItems is the hashtable which contains a collection of
ShippingItems. Each shipping item has a datamember called Itemized that I
need to populate with a string.
-----------------------------------------------------------------
Sub MergeMultiples
Dim m As clsMultiple
Dim s As clsShippingItem
Dim str As String
For Each s In htShippingItems.Values
If s.Multi = "-1" Then
For Each m In htMultiples.Values
If m.Multi = s.ItemID Then
str &= m.ItemID & "," & m.Description & ","
End If
Next
str = str.TrimEnd(",")
s.Itemized = str
End If
str = ""
Next
End Sub
--------------------------------------------------------------------
Im obtaining the data I need from another hashtable which contains a
collection of Multiple Objects.
At the point of str = str.TrimEnd(",") the str variable contains the desired
data and it gets assigned to s.Itemized.
But Afterwards if I try to access the Itemized member from the hashtable it
is null.
Thanks for any help
Slonocode
The objects have a datamember that is empty.
I need to loop through the items in the hashtable and add data to the
datamember that is empty.
htShippingItems is the hashtable which contains a collection of
ShippingItems. Each shipping item has a datamember called Itemized that I
need to populate with a string.
-----------------------------------------------------------------
Sub MergeMultiples
Dim m As clsMultiple
Dim s As clsShippingItem
Dim str As String
For Each s In htShippingItems.Values
If s.Multi = "-1" Then
For Each m In htMultiples.Values
If m.Multi = s.ItemID Then
str &= m.ItemID & "," & m.Description & ","
End If
Next
str = str.TrimEnd(",")
s.Itemized = str
End If
str = ""
Next
End Sub
--------------------------------------------------------------------
Im obtaining the data I need from another hashtable which contains a
collection of Multiple Objects.
At the point of str = str.TrimEnd(",") the str variable contains the desired
data and it gets assigned to s.Itemized.
But Afterwards if I try to access the Itemized member from the hashtable it
is null.
Thanks for any help
Slonocode