Copy records with a new AutoNumber [Resolved]
I am trying to do the following statement
This will basicially make a copy of the records that have a flight number of Lounge. The problem is that there is a primary key DataID which is an autonumber. If I use this statement, it will give me a message about the duplicate records. Is there a way to make a copy of the records but having access create new numbers for the copied records? Or will have to do this using two recordsets and create the autonumber msyelf?
I am trying to do the following statement
Code:
sSQLQuery = "INSERT INTO Test SELECT * FROM Test WHERE [Flight #] = 'LOUNGE'"
cn.Execute sSQLQuery
This will basicially make a copy of the records that have a flight number of Lounge. The problem is that there is a primary key DataID which is an autonumber. If I use this statement, it will give me a message about the duplicate records. Is there a way to make a copy of the records but having access create new numbers for the copied records? Or will have to do this using two recordsets and create the autonumber msyelf?
Last edited: