Copy Record with Auto ID Primary Key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to copy a record if the table has an auto number primary key?
I often need to copy a record in my business, but each time I try I get a
message that because of null value of primary key can't save copied record.
Help appreciated.
 
How are you trying to do the copy?

If you use an INSERT INTO query, explicitly list all of the fields other
than the Autonumber field:

INSERT INTO MyTable (Field1, Field2, Field3)
SELECT Field1, Field2, Field3
FROM MyTable
WHERE ID = 1234
 
If I remove the primary key from the qry that I use for my main form - where
all the fields are that I need to copy - would that allow me to copy?
 
Forget my previous reply. I tried it and it does not work.
I do not understand Insert Into qry. Do you mean create a qry with the
field of the record? Confused with Insert Into My Table.
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

Back
Top