Hallo,
I have a treeview control which I populate from a table, each record is a node. I use "N" & PrimaryKeyField (which is an Autonumber) as the Key for each node.
My problem is how to clear the tree to repopulate it?
I currently use Me!ActiveXCtl0.Nodes.Clear to clear the TreeView control, but when I re-run my populate code, it gives the following error:
35602 Key is not unique in collection
Suggesting that it is trying to add the same key again, although I thought they had all been deleted.
If I close the form and re-open it it populates correctly.
Any ideas?
- Frink
I have a treeview control which I populate from a table, each record is a node. I use "N" & PrimaryKeyField (which is an Autonumber) as the Key for each node.
My problem is how to clear the tree to repopulate it?
I currently use Me!ActiveXCtl0.Nodes.Clear to clear the TreeView control, but when I re-run my populate code, it gives the following error:
35602 Key is not unique in collection
Suggesting that it is trying to add the same key again, although I thought they had all been deleted.
If I close the form and re-open it it populates correctly.
Any ideas?
- Frink