Updating data in one form to another form using Subform

Updating data in one form to another form using Subform

Hi,

I have problem, i can update data to another form. But just using standar field.

The question, i want to update data to another form using subform. I want to update JUMLAH base on BUKU.

Thank you


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

updatesubmit = DB_Perpustakaan[ID = input.Subform_Buku.Buku];
if(updatesubmit.count(ID) == 1)
{
if(Subform_Buku.Buku == updatesubmit.ID)
{
for each rec in Subform_Buku
        {
updatesubmit.Jumlah=updatesubmit.Jumlah - rec.Jumlah.toLong();
updatesubmit.Dipinjam=updatesubmit.Dipinjam + rec.Jumlah.toLong();
}

}
}