autofill subform

autofill subform

how to autofill subform using details from another form.
Help me with code.