How do I set the first value of AutoNumber in Access?

Although Access doesn't offer this function natively, it can be achieved through a query, like the following:

CREATE TABLE TableThatIncrements
(
Id AUTOINCREMENT(1001,1)
)

This will create a single table that's called "TableThatIncrements" with a single column, named "Id". You can now use the table editor to add properties and/or other columns.

Change

AUTOINCREMENT(x,y)

to suit your needs, where x is the initial increment number and y is the number to increment with. So AUTOINCREMENT(100,5) will yield: 100, 105, 110, 115, etc.

If you want to alter an existing table, use the following query. Make sure that specific table's tab is closed so Access can lock it down and alter it.

ALTER TABLE TableThatIncrements
   ALTER COLUMN Id AUTOINCREMENT(1001,1)

You can run a query in Access by doing the following:

  1. Go to the "Create" tab and click "Query Design"
    enter image description here

  2. Just close the window that appears which asks you to select tables, we don't need that.

  3. Go to the "Design" tab and click the button with the arrow until you get a textual input screen. (By default, it says SELECT;).
    enter image description here

  4. Delete the default text and paste the above query.

  5. Click "Run".
    enter image description here


1- Create table1 2- Go to create ------- > design query. 3- Close table 4- Go to SQl from above. 5- Past this code.

ALTER TABLE [TABLE1] ALTER COLUMN [Id] COUNTER (8982,1)


This website has a very simple way to start your autonumber with whatever number you wish: http://www.fmsinc.com/microsoftaccess/AutoNumber%20Field/Creating.asp

You create a query with an expression which tells the autonumber field to change

"First, run this query:

INSERT INTO tblName ( ID ) SELECT 999 AS Expr1

Where tblName is the table name, and ID is the name of the AutoNumber field.

Then, run a second query to delete the row that you inserted:

DELETE FROM tblName WHERE ID=999;

(Alternatively, you can simply open the table and manually delete the row that you inserted.)

Now, the next record added to the table is assigned the value 1000.

This method works with a new table, or with a table whose AutoNumber has not yet reached the Seed value. (Of course, the ID field for existing rows will not be changed, but subsequent rows will start with 1000.)"