XML RSS
What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Home
Whats New!
Need a database?
Tips via email
Learn VBA
Questions Answered
Access Tips Index


Appending to an AutoNumber Field

There may be times when you wish to import numbers (they maybe of data type AutoNumber or not) into an AutoNumber field which is also (and usually) your primary key. This may be the case if, for example, you started assigning client ID numbers which you use consistently in your business in an Access database, but you have built a new system in which you wish to import these same ClientID’s, and then wish to continue the AutoNumber (primary key) from where the final number of your old system was. You would best do this using an Append query; but you may find you have trouble importing into an AutoNumber field, especially if it is your primary key field for that specific table. You may be tempted to change the field type to Number and change it back after the append query, but alas, you cannot change to an AutoNumber data type once you have entered data. The secret is to temporarily un-assign the autonumber as the primary key. This allows you to append your records without any trouble (just make sure you do not have any duplicates when appending, otherwise when you do you will get an error)

If you do not know how to create an Append Query then try this tip

Append Query

Do you like this tip? Subscribe to my weekly Newsletter to receive tips weekly via email. Click Here to subscribe.

footer for Microsoft Access page