Hi I am trying to create a treeview from data in a table - I used to hard code it in like this...
with thisform
.oleTree.nodes.add(, 1, 'Sys1','System', 'System')
etc etc...
Here is the code I am using to read in from the 'navigator' table...
select navigator
* loop through all the records
for intLoop = 1 to reccount('navigator')
strGroup = alltrim(navigator.na_group)
strName = alltrim(navigator.na_name)
strGraphic = alltrim(navigator.na_graphic)
strIdent = alltrim(navigator.na_ident)
* test each record to see if it's a topnode
if navigator.na_topnode
.oleTree.nodes.add(, 1, strGroup, strName, strGraphic)
else
.oleTree.nodes.add(strGroup, 4, strIdent, strName, strGraphic)
endif
endfor
BUT I get an error - "OLE IDispatch exception code 0 from Nodes: Key is not unique in collection."
I checked the values getting read into the command and it's the same as my code above...
Any ideas?