I implemented the unique key function from your post and I am still getting the key not unique when I add a child.

VB Code:
  1. Private Sub initializeTree()
  2.     tvwItems.ImageList = imgList
  3.    
  4.     Dim nodClass As Node
  5.     Dim nodTitle As Node
  6.    
  7.     tvwItems.LineStyle = tvwRootLines
  8.     tvwItems.Nodes.Clear
  9.    
  10.     'Initialize the recordsets
  11.     Set rsClass = New ADODB.Recordset
  12.     Set rsTitle = New ADODB.Recordset
  13.  
  14.     'Open the Class recordset
  15.     strSQLClass = "SELECT id, classification FROM tblClassification ORDER BY classification"
  16.     rsClass.Open strSQLClass, conTree, adOpenStatic, adLockOptimistic
  17.    
  18.     'set node for treeview
  19.     If rsClass.RecordCount > 0 Then
  20.         While Not rsClass.EOF
  21.             Set nodClass = tvwItems.Nodes.Add(, , (rsClass.Fields("classification")), (rsClass.Fields("classification")), 1)
  22.  
  23.             'Opens the recordset for Title
  24.             strSQLTitle = "SELECT id, uniquekey, title, classification, code, dateadded FROM tblSnipplets WHERE classification LIKE '" & (rsClass.Fields("classification")) & "%'"
  25.             rsTitle.Open strSQLTitle, conTree, adOpenStatic, adLockOptimistic
  26.            
  27.             'set node for treeview
  28.             If rsTitle.RecordCount > 0 Then
  29.                 While Not rsTitle.EOF
  30.                     Set nodTitle = tvwItems.Nodes.Add((rsClass.Fields("classification")), tvwChild, (rsTitle.Fields("uniquekey")), (rsTitle.Fields("title")), 2)
  31.                   '  Set nodTitle = tvwItems.Nodes.Add
  32.                    
  33.                     nodTitle.Tag = rsTitle.Fields("Id").Value
  34.                     rsTitle.MoveNext
  35.                     DoEvents
  36.                 Wend
  37.             End If
  38.             rsTitle.Close
  39.            
  40.             rsClass.MoveNext
  41.             DoEvents
  42.         Wend
  43.     End If
  44.     rsClass.Close
  45. End Sub