#DEFINE tvwLast 1 && Last sibling *!* now scan the cursor and add the nodes lcAlias = << Alias to use to populate TreeView >> lcKeyField = << Primary Key Field >> lcTextField = << Name of field to use as Node Text >> SELECT ( lcAlias ) SCAN lcKey = UPPER( ALLTRIM( lcAlias ) ) + '*' + ALLTRIM( TRANSFORM( EVALUATE( lcKeyField ) ) ) This.Nodes.Add( , tvwLast, lcKey, ALLTRIM( TRANSFORM( EVALUATE( lcTextField ) ) ) ) ENDSCAN This.Sorted = .T.