What code are you using to set your Key? I've always had to append a string
value to it:
"W" & rst("lngID")
assuming I was filling from a recordset ...
>I use a combobox to open a treeview control with
> I get the message
> Key is not unique in collection.
> I mean my key is unique, but I still get the message.
> regards
> reidarT
If the previous reply didn't help, here's another suggestion:
You will get this message if you try to repopulate (via code) a treeview
control, unless you clear the nodes first. If the code from your combo-box
is doing that, include the line
Nodes.Clear
before you start repopulating the control.
HTH,
Rob
> I use a combobox to open a treeview control with
> I get the message
> Key is not unique in collection.
> I mean my key is unique, but I still get the message.
> regards
> reidarT
Rob Parker - 23 Mar 2005 13:22 GMT
Oops, typo struck, forgot the "."
It should read:
.Nodes.Clear
And that's assuming that you've put it in a With construct for the
repopulation; if not, the full syntax is:
Me.treeviewName.Nodes.Clear
Rob
> If the previous reply didn't help, here's another suggestion:
>
[quoted text clipped - 14 lines]
> > regards
> > reidarT