select ckey from treeview into cursor csrtemp use (dbf([csrtemp])) again in 0 alias csrtable select csrtable use in csrtemp nodeptr = thisform.oletreeview.selecteditem local childnodeptr childnodeptr = m.nodeptr.child do while !isnull(m.childnodeptr) append blank replace ckey with m.childnodeptr.key childnodeptr = m.childnodeptr.next enddoThere is no error but I don't get the correct value for the table. Records seem to be appended every time to table csrtable, previous values are retained.