>HI
>
>Pl. Help me solving this problem.
>I am getting this funny problem of not getting the form closed when i click on close button after clicking on save button if the second treeview is having more then 2 chield nodes for a single node.
>
>I have developed a form using two treeviews.
>
>Now I am at the edge of completing the form and I am facing this problem.
>But before I give my problem let me tell you few things.
>
>1. I am populating Tree 2 using Tree 1.
>2. Form works fine If I am shifing one entry from tree "A" to tree "B"
>3. Form alse works fine If I am doing the following things
>shifing one entry from tree "A" node A1 to tree "B" node B3.
>shifting one entry from tree "A" node A1 to tree "B" node B2.
>4. If I do the follwing then I am getting problem while closing the form.
>shifing one entry from tree "A" node A1 to tree "B" node B2.
>shifting one entry from tree "A" node A1 to tree "B" node B2.
>
>That is if Tree "B" is having two entries in any of its node then I
>am getting problem.
>The close button does not do anything. Form is still getting displayed.
>
>
>
>Code Written for "Save" Button.
>
>sele delivman
>go top
>do while not eof()
>key1 = "DKEY_" + allt(dlman_init)
>keyref = thisform.oletargettree.nodes(key1)
>if keyref.children > 0
>loref = keyref.child
>do while .t.
>if isnull(loref)
>exit
>endif
>mycurrentkey = loref.key
>myparentkey = loref.parent.key
>mycashmemono = int(val(substr(mycurrentkey,6)))
>mydelivman = substr(myparentkey,6)
>select cashmemo
>set order to tag cashmemo
>seek mycashmemono
>if found()
>repl dlman_init with mydelivman
>endif
>loref = loref.next
>enddo
>endif
>sele delivman
>skip
>enddo
>
>retu
>
>
>
>Code written for "Close" Button
>close all
>thisform.release
>
>
>
>Pl. Help.
>Thanks in Advance
Ashish,
Missing code is how you add a node from A to B.
Cetin