• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

MS Access Duplicating records does not create a unique AutoNumber for ID column

Hi. I am using the following SQL in an Access Query to duplicate rows for a certain TransactionID. It works fine but for some reason the new records have the same number
as the original records for the ID column, which is an AutoNumber column. I'm not sure how this is possible as I would expect unique numbers to be generated.


INSERT INTO Transactions
SELECT *
FROM Transactions
WHERE TransactionID=17330;
0
Murray Brown
Asked:
Murray Brown
2 Solutions
 
als315Commented:
I think you allow duplicates in ID field. Can you upload sample DB with this table and  some dummy records. Try not to use *, add fields separately.
0
 
Armen Stein - Microsoft Access MVP since 2006Commented:
An append query like yours can set the value of an autonumber.  This is a handy capability if you are converting records from another system.  In your case, specify all the other fields but not the autonumber; you can't use *.

Cheers,
Armen Stein
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now