How do I reset the auto number field in access to form 1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have designed a database and were I have been de-bugging the auto no field
has counted up, How do I reset this. I have tried deleting the row in the
table design and then re-inserting but this does not reset it please
heeeeeeeeeelp.
 
Jamie said:
I have designed a database and were I have been de-bugging the auto
no field has counted up, How do I reset this. I have tried deleting
the row in the table design and then re-inserting but this does not
reset it please heeeeeeeeeelp.

It will reset if you delete ALL rows and then compact the file. However; if
your app "cares" about the value of AutoNumbers in any way other than
uniqueness then you have a design problem. If your intent was to have a
gapless incremental number starting at 1 then AutoNumbers will almost
certainly dissapoint you.
 
After deleting all the test data, go to Tools|Database Utilities|Compact and
Repair.
 
Copy and paste your existing table but copy design only and not data.
Copy and paste your data from your existing into the copy
Delete your existing and rename your copy to the existing.
 
Compacting will reset Autonumber fields if there are no records in the
table.
 
I suggest you may not want to use Autonumber for that use. Autonumbers are
designed to provide unique numbers. It in not designed to provide numbers
in order and for a number of reasons may not do so. As a result using them
in any application where the user sees the numbers is likely to end up with
confusion.

There are other ways of providing the numbers you want depending on the
particual application.
 

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

Back
Top