reseting autonumber field

B

Boris Condarco

Hi gurus,

Does anyone know how to reset the value of an autonumeric field without
deleting the table? something like the "dbcc checkident" sqlserver command?
 
A

Arvin Meyer

Boris Condarco said:
Hi gurus,

Does anyone know how to reset the value of an autonumeric field without
deleting the table? something like the "dbcc checkident" sqlserver
command?

If there is data that isn't related to any other tables' data, you can
delete the column and add it back. If there is no data, or you can delete
all the data, simply compact the database and the Autonumber will reset.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
N

Natasha

I trancated table, tried to delete column with
autonumber, got error message. I work with Access2000.
Sql statement
ALTER TABLE Employees ADD COLUMN RecordID AUTONUMBER

does not work for me also, please help.
 
A

Allen Browne

To reset the autonumber to the next available value, just compact the
database:
Tools | Database Utilities

You can also reset it programmatically if you have a reason to. With the
ADOX library you can set the Seed property of the Column of the Table of the
Catalog.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Boris Condarco said:
Does anyone know how to reset the value of an autonumeric field without
deleting the table? something like the "dbcc checkident" sqlserver
command?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top