ID autonumber

I have a "staging" table that i delete the entire contents from often.  How would i set things up so that the id (auto number) gets reset to 0 after ever delete?
vbnetcoderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kanti PrasadCommented:
Hi

The below link have some option on how to deal with Id numbers.

If you are truncating\deleting the table then you can create a new table with the same structure and add an auto number field.

https://support.microsoft.com/en-us/kb/812718
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
Autonumbers have no meaning so resetting them isn't necessary.  In most versions of Access compacting the database will reset the autonumbers.  And finally, if you must, you can use a query to reset the seed.

ALTER TABLE [tableName] ALTER Column [PKColumn] COUNTER(0, 1)
0
vbnetcoderAuthor Commented:
ty
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

PatHartmanCommented:
Did you really want an answer that requires manual intervention?  It would seem that running a query, even if you want to do it manually would be simpler.
0
vbnetcoderAuthor Commented:
Pat you are correct.  I am using your solution after thinking about it.
0
Kanti PrasadCommented:
Hi

I too agree that Pat's option is much neater....
0
PatHartmanCommented:
Are you going to change the point award?
0
vbnetcoderAuthor Commented:
can i do that since it has been awarded?
0
PatHartmanCommented:
You can.  Ask a moderator for attention.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.