How can an AutoNumber field start at some other value

R

RuralGuy

Aside from the fact that AutoNumbers should *never* be seen by the user or used
for anything but a unique number field in a table, you could look here:
http://allenbrowne.com/ser-26.html

I would like my autonumber field to start at 100000. How can i do that?

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
L

Larry Linson

. . . AutoNumbers should *never* be
seen by the user or used for anything
but a unique number field in a table

The reason for this is that users (and some developers) expect AutoNumbers
to be consecutive, increasing values, incrementing by 1. They often
(usually) are, but if one starts to create a new record, then cancels, the
autonumber is lost (never used), and there are other circumstances that can
cause gaps in the sequence.

Wanting the autonumber to start at a particular number implies that you may
have expectations of this kind. And, as Rural Guy said, they should only be
used as a unique identifier, because they are only expected to be unique,
not always a "monotonically increasing series".

Larry Linson
Microsoft Access MVP
 
S

Steve Schapel

Marko,

Open a blank query in design view, and enter 99999 in the Field row of
the first column of the query design grid. Make it an Append Query
(select Append from the Query menu), and nominate your table. In the
Append To row of the grid, enter the name of the Autonumber field. The
SQL of the query will look something like this....
INSERT INTO [YourTable] ( YourAutoNumberField )
SELECT 99999 AS Expr1;

Run the query (click the toolbar button with the red [!] icon). Close
the query, open the table, and selete this record just added. After
that, the next record added will have 100000 in the autonumber field.
 
Top