General discussion

Locked

Alter query in access to add autonumber column

By anil_kumar ·
I cannot add a AutoNumber column in Access By running a Query through the application coded in vb.net

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by dansimp In reply to Alter query in access to ...

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

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums