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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Capture

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
US
I can copy data from a subform with the following:

Private Sub Command2_Click()
frm_subform1.SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
End Sub

I want to copy 2 subforms at the same time, and I don't know how. I have tried the following and it doesn't work:

Private Sub Command2_Click()
[frm_subform1].SetFocus![frm_subform2].SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
End Sub

Can someone please help me with this?

Any help would greatly be appreciated.

Thanks in advance.


Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
why don't you copy one form then the next rather than trying to do them at the same time?
 
I really wanted to do this at one time, because I actually have 7 subforms on the mainform.

Can this be done?

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
you could use a for each loop and loop through the forms, and then copy them one at a time. It would save all the extra lines of code. Other than that..... someone more 1337 than me needs to figure that out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top