sele treeview go top =tableupdate(.t.) do while .not. eof() if ckey="R" lonewnode = thisform.oletreeview.nodes.add(,,alltrim(ckey),alltrim(ctext)) <--- this is where the error comes up else lonewnode = thisform.oletreeview.nodes.add(alltrim(crelative),crelation,alltrim(ckey),alltrim(ctext)) endif skip enddo