Function to create new form record, then delete subform record

Function to create new form record, then delete subform record

Hi,
Got some questions regarding a function that I am writing.
Main form "Parents"
With subform "Children"
Linked together through a lookup field "Parent_Field" in the Children form

The function I write will make a "Child" into a "Parent".
The function will be manually triggered by a button in the Children table, for each record.

So far:
  1. void child_to_adult(Children rec)
    {
            insert into Parents
            [
                Added_User = zoho.loginuser
                Date_of_Birth = rec.Date_of_Birth
                First_Name_s = rec.Child_First_Name
                Status = "Pending"
                Surname = rec.Surname
            ]
    }

Question 1:

Above puts data from the Child fields into a new record in Parents. How can I fetch data from the "Parents" form the child belonged to? For example I want to insert in the new record the Email address from the child's Parent. So something like Email = Parents.Email[ID=input.Parent_Field], but then in proper deluge ??

Question 2:

After the new Parent record has been created I want to delete the Subform Child record. How?

Question 3:

If possible then open the newly created Parent record for further Edit. Possible?