how to copy subform

how to copy subform

I have a form (transaction record) with a subform. I want to copy the whole form info. (for the second+ same transaction) with the subform, then I will edit some info necessary, then submit to produce a new transaction record.

But I could not find the way to copy the subform correctly, since every transaction with different lines of subform.

I set default 1 row for form on load, so every time I could only get one row (last row of the copied transaction)

I put the following code in form on load

if  (input.TransactionClass  ==  "Continuous Transaction")
     ...
    for each rinsured in recTrans.Insured
    {
        Insured.Insured=rinsured.Insured;
        Insured.InsuranceClass=rinsured.InsuranceClass;
        Insured.SumInsured=rinsured.SumInsured;
        Insured.Premium=rinsured.Premium;
    }
}

I search the forum, it seems I could not add a new row by code?

How can I do with the problem?