Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I reset Primary Key to zero?

Status
Not open for further replies.

Julianne

Technical User
Jan 30, 2002
156
GB
I'm a newbie with Access databases (which I'm using with ASP to build web pages). To test if my pages were working properly I entered some dummy information into the database. I then deleted the records once I'd finished testing (by highlighting and clicking the Delete Record button) but now entering new information is showing the first record as 4 (I'd entered 3 dummy entries) when I want it to go back to 1!

Is there a way of setting the Primary Key back to zero so the first entry will be given the number 1, or do I have to start all over again and build a new table?

Many thanks.

Visit my ice hockey site at:
 
I assume you are using an autonumber field for PK (which is good). Just compact the database after deleting records and you should start from 1 again.

Mike Pastore

Hats off to (Roy) Harper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top