There seem to be quite a lot of posts asking how to this and I was looking to do this myself but did not find the answer here.
A simple SQL statement will do this in Jet4.0 SQL
Code:
Dim cnn as ADODB.Connection
Dim StrSQl as string
StrSQL = "ALTER TABLE tblProblems ALTER COLUMN [Key] COUNTER(1,1)"
cnn.Execute strSQL
I use this for some tables that store temporary data for producing some reports and as such my data is removed prior to running this SQL. I would not suggest using this on a table where you preserve the data, especially when the counter field is used as a KEY field as I have done.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.