-
Ok... I have a database and a program which views the fields in the database. I am using an access 2000 database, ADO, and Jet.OLEDB.4.0. Each entry in the table has an ID number which I am automatically assigning with AutoNumber. The problem is that when I delete a record(for example say that it had ID "15"). The next record that I add will have ID "16", without assigning a record to ID 15. How do I prevent this?
Thanks In Advance....
------------------
Mitchell Hayenga
[email protected]
-
You can't. Once an autonumber has been used, then it has been used - end of story.
Not what you want to hear but the truth isn't always pleasant!!!
-
After you compact the database, the autonumbers will again begin at the next available number.
If you delete all records in a table, then compact, it will restart at 1
If you delete the last 3 numbers, then compact, it will restart at the number of the 1st one
hope that makes sense....try it for yourself if it doesn't
Tom
-
Thanks, I'll have to try that.....
------------------
Mitchell Hayenga
[email protected]