Once you enter data in a table, you can't change the data type of any field to AutoNumber, even if you haven't yet added data to that field.
Add a new field to the table, and define its data type as AutoNumber. Microsoft Access then enters data in the AutoNumber field automatically, numbering the records consecutively starting with 1.
Continuing from pkallas' suggestion, you can change the autonumber field's "seed" or beginning value (see Access Help under autonumber). However I think this will be rather a cumbersome arrangement programmatically.
Instead consider keeping the field as a number type. Then write a little function called from your form to increment the number each time a record is added. You can use a select query with the MAX aggregate function or DMAX to find the current highest value in the field.
If you are relying on the form's native navigation controls, then the increment function should be called from the form's BeforeInsert event.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.