When we develop software or website production, we often use ACCESS MDB database to debug. Many automatically numbered data are deleted, and the ID is very large or incoherent. For ACCESS database, sometimes the ID number jumps due to deletion of content, or other reasons, if you want to modify the automatically numbered ID, how to do it? Let's zero the ACCESS database ID step by step, modify the automatically numbered ID value, and then re-number it.
The following is my modification method, which is feasible. I will share it with you: (Before operation, be sure to back up the database to prevent accidents, haha)
1. Backup ACCESS database (this is a must)
2. Open the database, right-click Table A where you want to modify the ID value, open "Design View", change the data type of the ID field from "Auto number" to "Number", and close save.
3. Then open Table A, modify the ID value, or modify other existing data. Close the table after modification. (At this moment, the ID field cannot be changed back to the "auto-numbered" data type)
4. Right-click Table A, select "Copy", then right-click the blank space, select "Paste", and write the table name casually, such as "AA", select "Paste Only Structure" below, and then click OK to generate a new table AA.
5. Select Table AA and open "Design View". Change the data type of the ID field to "auto number" and close the save. (There is no data on Table AA at this moment, so it can be modified successfully)
6. Right-click Table A, select "Copy", then right-click the blank space, select "Paste", and write the new table "AA" that has just been generated, and select "Append data to existing table" below, and finally click OK.
7. Then change the original table A to A111 and change the table AA to A. This enables the replacement of the old table with the new table, only the ID value is modified, and other content remains unchanged. (Tip: The original table A can be deleted without changing its name. However, I suggest changing its name as a backup first, and then deleting it after the new table test is successful)
This operation can be learned from one example and can not only change the ID value, but also other data types. Everyone can freely play it!