Insert Autonumber column to a table

R

Robert_DubYa

I found the following code to insert a column to a table. The code creates
the column as text (works great). Can I change this to autonumber? If so
how?

Dim strSQL As String
strSQL = "ALTER TABLE tblTest ADD COLUMN MyNewTextColumn nvarchar(50)"
CurrentProject.Connection.Execute strSQL, , adCmdText

as always thank you very much!

Robert
 
R

Robert_DubYa

Found my answer already:

Dim strSQL As String
strSQL = "ALTER TABLE tblTest ADD COLUMN MyNewTextColumn counter"
CurrentProject.Connection.Execute strSQL, , adCmdText
 
Top