I am working with a MS Access database that has no primary keys in the tables (I'm well aware this is a terrible practice). The database is built on 4 linked tables (data is imported from excel files daily) and queries which create temporary tables. I have used alter table to add a primary key to one of the created tables. Therefore, the table is generated daily through a query, a primary key is then added. Is there anyway so that it will auto increment? As it stands my table has 15k records yet my primary key column is empty. It's essential for new queries in order to create joins etc. I do not know VBA.
I have tried this (and similar variations)
Alter Table Unified_Backlog_Shipping_Table
Add P_Key Number AUTOINCREMENT;