Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Information from Form to subform with button

Status
Not open for further replies.

Shadez

Programmer
Jul 5, 2001
57
US
I am sure this has been discussed . I can't seem to find it anywhere though. I am still quite the novice in the coding off access so please be specific.

For the example purposes lets make this as simple as possible: Lets say I have a foem called Main and a subform called subform :)

I want to copy 2 fields company and name to the subform. Could someone post an example of the best way to accomplish this?

 
Let's call the fields on the Main Form and the sub form both
Field1 and Field2.

I will assume that you only have one SubForm record for each MainForm record. In the click event of your button you cab put...

Me![MySubFormName].Form![Field1] = Me!Field1
Me![MySubFormName].Form![Field2] = Me!Field2
ljprodev@yahoo.com
ProDev, MS Access Applications B-)
 
thanks a ton. Thanks for assuming the piece of info I forgot to give. Yes one record to one record. Using it as a way for people to selectively update information from a larger Database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top