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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top