Link to home
Start Free TrialLog in
Avatar of indyng
indyng

asked on

How can I reset autonumber of linked table?

I have this:

strSQL = "ALTER TABLE Extracted_NDW_WEEKLY_PRODUCT_MOVEMENT ALTER COLUMN [Auto_ID] COUNTER (10,1); "
CurrentDb.Execute (strSQL)

Thanks
Avatar of rockiroads
rockiroads
Flag of United States of America image

If this is a access db, only way I know how to reset autonumber is to empty table then do a compact/repair.

Is this backend msacceess or some other db
ok, your sql will work but unless the table is empty, you run the risk of failing records due to duplicate records

as you cant do this on linked tables, only other way I can think of is if you open the access database via vba then run the sql



ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial