My database has an autonumber key field and it is giving me problem. I wish somebody had told me not to use autonumber as my key field. But I am too deep in my database design and VBA codes to turn back now. Sigh.
Here is my problem:
I have some records deleted from my database, leaving some gaps in the autonumber. The deleted records were kept in another table within the same database in case I wanted to re-use them. Recently I imported some records from an Excel file which didn’t have an autonumber field in the header row. After importing, I found that the gaps that were left behind by the deleted records were filled with the new records plus some new records with new (previously unused) autonumber. When I attempted to undelete my deleted records, obviously redunctancy of autonumber occurred, resulting in error.
Is it what normally happened to tables with autonumber key field? (I remember I read somewhere that autonumber field will start automatically with the next highest number.) How would I import records from an Excel file so that it will always start with a new autonumber?