Copy To New Record
acCmdCopy, acCmdPasteAppend, acCmdSelectRecord
This example copies the existing record on a form and creates a new record with exactly the same information. If the underlying table has an Autonumber then this field takes the next available number. To use the code, create a button on the form called cmdInsert and paste the code into the On Click event.
'***************** Code Start *******************
' This code was originally written by Terry Wickenden.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
Private Sub cmdInsert_Click()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend
End Sub
'***************** Code End **********************