aftershokk
Registered User.
- Local time
- Today, 08:38
- Joined
- Sep 5, 2001
- Messages
- 259
I have a form and a subform. The DB was pre-existing so I am trying to work with it. I used the wizard to create a duplicate record button to cut down on entry data for the user.
When viewing a certain record I want to be able to copy and paste the data in the form and subform into a new record and populate the form and subform. I can get the main form to work using the code below but not the subform.
Private Sub copy_rec_command_button_Click()
On Error GoTo Err_previous_record_button_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
Exit_previous_record_button_Click:
Exit Sub
Err_previous_record_button_Click:
MsgBox Err.Description
Resume Exit_previous_record_button_Click
End Sub
When viewing a certain record I want to be able to copy and paste the data in the form and subform into a new record and populate the form and subform. I can get the main form to work using the code below but not the subform.
Private Sub copy_rec_command_button_Click()
On Error GoTo Err_previous_record_button_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
Exit_previous_record_button_Click:
Exit Sub
Err_previous_record_button_Click:
MsgBox Err.Description
Resume Exit_previous_record_button_Click
End Sub