If you want to create missing rows (records) without data (or with) but with AutoNumber field and don't want to change the current records' autonumber field values :
Sample:
Current Table
ID Field1 Field2
1 10 50
3 20 60
7 30 70
And you want to get:
ID Field1 Field2
1 10 50
2
3 20 60
4
5
6
7 30 70
(My previous suggestion makes it like below:
ID Field1 Field2
1 10 50
2 20 60
3 30 70)
then:
Please backup your original database file before everything.
(My sample table name is "mytable")
Copy mytable as a new table into same database (Edit Copy/Paste)
Rename new table as "tmptable"
Open mytable and remove all data (delete all)
**YOU DO NOTHING IN MAIN TABLE STRUCTURE, ONLY DELETE ALL DATA AFTER COPYING IT AS NEW TABLE**
Open tmptable in design view and remove Primary Key property (DO NOT DELETE field, just remove Primary Key property) and change AutoNumber data type to Number.
Save tmptable and goto open it in data view and enter the missing fields (just missing numbers into related field or if you need, all other fields data with it)
Before entering data
ID Field1 Field2
1 10 50
3 20 60
7 30 70
After entering missing data
ID Field1 Field2
1 10 50
3 20 60
7 30 70
2
4
5
6
Close tmptable
Goto Queries and New.
When you get query design view do NOT select any table and close Show Table window.
Select View_SQL view in main menu (you will see SQL code with SELECT; only. Delete it.)
Paste the following SQL string into this SQL view.
INSERT INTO myTable SELECT * FROM tmptable;
(Make sure you changed myTable and tmptable table names in the SQL string above with yours)
Point to Query_Run in main menu. See what happened in main table.
This is what I would do when I accidentially delete records from a table has AutoNumber field and I need deleted autonumber fields back and also consistency for saved records. And I don't know if easier way exists
Suat