From: christianlott1 on
Hi,

I'm working w/ data like this:

parent: 1061001
child: 810
parent: 1061002
parent: 1067303
child: 809
parent: 1068201
child: 808
parent: 1068202

next child: 810 <--- breaks here

saying 'key is not unique in collection'. So the parents are unique
and the children are unique to the parent but not always to other
children - simpler:


A B
A C
B B <-- breaks because B is a child of A.

It seems ridiculous this would be a factor. It's as if you had the
same file in two separate folders, why is this not allowed?

Am I missing something?

Code:

If x = 0 Then 'root

Me.xTreeview.Nodes.Add Text:=curRec, Key:="k" & curRec

Else 'child

Me.xTreeview.Nodes.Add Relationship:=tvwChild, Relative:="k" & TA(x -
1), Text:=curRec, Key:="k" & curRec

End If

--------------

Even using:

Me.xTreeview.Nodes.Add Relationship:=tvwChild, Relative:="k" & TA(x -
1), Text:=curRec, Key:="k" & TA(x - 1) & curRec

to make sure the key is unique to that node doesn't work (gives
'element not found').

Thanks






From: christianlott1 on
ok, disregard this question for now. My routine has some deeper
problems :(

thanks.