The closest I've been able to get to doing this via code is to:
Create a new Table using Tabledefs - this is necessary because it's the only way I know to create/define a field as an autonumber in code. You can then generate an append query to copy the old data to the new and let it auto-increment.
This could create additional problems if you have any table relationships involved - in which case you'd have to break/re-establish those also, from code using DAO only (ADO doesn't support it).
Code:
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set fld = tdf.CreateField("ID", dbLong)
fld.Attributes = fld.Attributes Or dbAutoIncrField ' autonumber options
tdf.Fields.Append fld
dbs.TableDefs.Append tdf
Obviously, these commands could be embedded a bit more - I snipped these out of a function I wrote previously.
Mike