Discussion Locked

Alter query in access to add autonumber column

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I cannot add a AutoNumber column in Access By running a Query through the application coded in vb.net

1 reply

by dansimp

use the following VB

SQLcode = "alter table yourtablename add column yourcolumnname counter(1,1);"
DoCmd.RunSQL SQLcode

Note the counter(1,1) will start the auto number at 1 and increment each time by one.

KindRs,
Dan

This discussion is closed to new replies.