dbTalk Databases Forums  

treeview question

comp.databases.ms-access comp.databases.ms-access


Discuss treeview question in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default treeview question - 07-09-2010 , 11:50 AM






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

Reply With Quote
  #2  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: treeview question - 07-09-2010 , 12:07 PM






ok, disregard this question for now. My routine has some deeper
problems

thanks.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.