change the starting vaule for an autonumber field access 2007

K

Krzysztof Pozorek [MVP]

(...)
how do I change the starting value for an autonumber field in access 2007

DoCmd.RunSQL "alter table Table1 alter column ID counter(X,1)"

X - starting value

K.P.
 
K

Krzysztof Pozorek [MVP]

You may use it in a query:
alter table Table1 alter column ID counter(1,1)

or in VBA code (module, immediate window):
DoCmd.RunSQL "alter table Table1 alter column ID counter(1,1)"

K.P. MVP, Poland
www.access.vis.pl


(...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top