subform and mainform

K

kawther

i have many records in subform, i would like once i click on the record to be
copy in main form .

how can i do it
 
T

Tom van Stiphout

On Thu, 18 Sep 2008 00:16:00 -0700, kawther

In the subform's Form_Click event write:
With Me.Parent
.MyFirstControlInParent = Me.MyFirstControlInSubform
.MySecondControlInParent = Me.MySecondControlInSubform
'etc.
End With

Of course you need to change the control names.
If the control names are identical or can easily be derived, you can
also use a loop:
For each control in me.controls

-Tom.
Microsoft Access MVP
 
Top