Hey Dear All



I have a sub form in footer of main form. The same fields are on main form. Now I want to copy the record of sub form to mainform. I used following code in a field of main form.

Main form name:Transform
Filed names : Name, Grade, Desig and Deptt


sub form name: subform
Filed names : Name, Grade, Desig and Deptt

Code is :

Private Sub Billing_Month_BeforeUpdate(Cancel As Integer)
Me.Name.Value = Forms(SubForm)!Name
Me.Grade.Value = Forms(SubForm)!Grade

End Sub

Regards.

Wasim