Duplicate Record with Primary Key

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I want to be able to copy a record within the same table. I added a command
button to duplicate record on a form. The problem is there is a primary key
and it will not allow me to copy. The records gets written to a paste error
file. Is there any method to copy all but the primary key and get access to
assign a new (autonumber) for the new record?

Thanks.
 
In the table, or in a query, you should be able to just copy and paste. The
autonumber will change to the new one.

From a form, use a recordset, or an Insert statement to append a record to
the table, leaving out the autonumber field.
 
Back
Top