Ok, I have a user that wants to duplicate some records in access 2010. I know this it is a simple task to create a button to duplicate only this creates the record directly on clicking the button. I would like the user to have a prompt that when the user clicks duplicate record, they get a prompt "Are you sure you would like to duplicate this record" Yes No. yes creates the record and no ends the code. the current code for duplicating the record from a button is a follows.
Private Sub Command64_Click()
On Error GoTo Err_Command64_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdPaste
Exit_Command64_Click:
Exit Sub
Err_Command64_Click:
MsgBox Err.Description
Resume Exit_Command64_Click
End Sub
Private Sub Command64_Click()
On Error GoTo Err_Command64_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdPaste
Exit_Command64_Click:
Exit Sub
Err_Command64_Click:
MsgBox Err.Description
Resume Exit_Command64_Click
End Sub