Automatically copy data into a subdatasheet

  • Thread starter Thread starter taylor1
  • Start date Start date
T

taylor1

Guest
Please forgive me if this has already been explained...but I've searched and searched and haven't found anything like it...

I have a form which contains a command button to open another form which is attached to a subdatasheet in Microsoft Access 2002. When I click on the button to open the sub form, I would like for it to automatically copy the contents of a text box on the original form to a text box on the sub form.

Any help you could offer would be appreciated.

- Taylor
 
I'm assuming that what you are trying to copy is actually the key value so the records can be related. Put code similar to the following into the BeforeInsert event of the popup form.

Me.TheForeignKey = Forms!firstForm!ThePrimaryKey
 
I'm assuming that what you are trying to copy is actually the key value so the records can be related. Put code similar to the following into the BeforeInsert event of the popup form.

Me.TheForeignKey = Forms!firstForm!ThePrimaryKey

Thaaaaaaaaaank u Sooooooooo Much
I've been gooooooogling for this think for so long and finally it got me here. Honestly, I registered just to thank you :D
Thanks again ;)
 

Users who are viewing this thread

Back
Top Bottom