I am building a collection of Supplier numbers and names.
The supplier numbers are unique, but the supplier names are not necessarily !
My code is as follows :
VB Code:
Do While Not rs1.EOF tempSupplier = rs1.Fields(0) tempSupplierName = RTrim(rs1.Fields(1)) Suppliers.Add tempSupplier, tempSupplierName rs1.MoveNext Loop
I have hit a supplier who shares the same name as one that has already been added, and its throwing up a duplicate key error
![]()
i.e.
875 CAVALCADE CLOTHING CO LTD
30186 CAVALCADE CLOTHING CO LTD
I assumed that the supplier NUMBER would be the key, therefore I would not have a problem![]()
Does this mean ANY data added to a collection MUST be unique ?
Confused ..........




Reply With Quote