Hi,

I'm trying to use treeview control in a Access 2000 project. It works sometimes, but generally I get an message like "Run-time error '-2147417848' (80010108) Method 'Add' of object 'INodes' failed".

Please help me to avoid this error...
Thank you...

the code is:

Private Sub FillProducts()
Dim nParent As Integer

treProducts.Nodes.Clear
With Me![Products].Form.Recordset
If .RecordCount > 0 Then
.MoveFirst
Do Until .EOF
nParent = .Fields("High_Level_ID").Value
If nParent = 0 Then
treProducts.Nodes.Add , , "ID" & CStr(.Fields("ID").Value), .Fields("Name").Value
Else
treProducts.Nodes.Add "ID" & CStr(nParent), tvwChild, "ID" & CStr(.Fields("ID").Value), .Fields("Name").Value
treProducts.Nodes("ID" & CStr(.Fields("ID").Value)).Tag = "ID" & CStr(nParent)
End If
.MoveNext
Loop
End If
End With
End Sub