Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / March 2005

Tip: Looking for answers? Try searching our database.

Treeview control error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ReidarT - 22 Mar 2005 14:43 GMT
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
Scott McDaniel - 22 Mar 2005 15:23 GMT
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
Rob Parker - 23 Mar 2005 12:58 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.