If the field in question is really an autonumber, the fact that some records are missing a value is alarming. The table is corrupted and perhaps the entire database.
To fix the table
0. Turn off Name Auto Correct if it is on.
1. Remove any Referential Integrity. You will add it back later.
2. copy all the records with missing IDs to a temporary place and delete them from the table.
3. Copy the schema of the original table to create a new, empty table.
4. Create append query #1. Select remaining records from original table and append them to new, empty table. Include the autonumber in the selection. This is the ONLY way you can update an autonumber - i.e. append it with a record..
5. Compact and repair.
6. Create append queyr #2. Select the records missing the autonumbers from the temp table and append them to the new table. Do NOT include the autonumber column. Access needs to assign a new autonumber.
7. Compact and Repair.
8. Delete the original bad table
9. Rename the new table to the old table name
10. Reset the RI
11. Turn on Name auto correct if you really want it on. This is such a dangerous "feature" that I always leave it off and only turn it on if I need it to do its thing and I am prepared to step through it to ensure everything I change propagates correctly.
PS, at some point in time, there was a bug with the Seed of the autonumber and if you had a table with an autonumber but had defined a different column as the PK, the autonumber would loose it's seed and start generating duplicate numbers. As the others have mentioned, the autonumber has one and only one use and that is as a unique primary key for a table. If you have a different field defined as the primary key, you have no need of the autonumber and it should be removed from the table.
PPS, In this particuar situation, you might be able to fill the gaps if you know which records should go where. To do that, you could type the numbers into the empty fields in the temp table. BUT, you would have to assign valid numbers to all of the rows, not just some OR split into two tables. Then in #6, the second append query would also include the PK field in the queyr.