Duplicate subForm Info

C

Confused Slug

I am using the biult in wizard to create a button on a form and to duplicate
the record and paste the info into a new record / form, re below. However,
the form contains a subForm and i would like this information to be
duplicated at the same time as the main form and pasted into the new record.
How would i code this?


Private Sub DuplicateRecordButton_Click()
On Error GoTo Err_DuplicateRecordButton_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

Exit_DuplicateRecordButton_Click:
Exit Sub

Err_DuplicateRecordButton_Click:
MsgBox Err.Description
Resume Exit_DuplicateRecordButton_Click

End Sub




Thanks
Confused
 

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

Similar Threads


Top