AutoNumber Reset

G Marshall

Board Regular
Joined
Dec 31, 2002
Messages
134
Hello
I have a form on a database with an "AutoNumber" field. This number obviously increments by one, each time a record is entered on the form.
When setting up my database I have entered records to test the system and the "AutoNumber" field is now sitting at 25. How can I reset the "AutoNumber" field to start at 1 again.
I have tried deleting the records in the corresponding table but the AutoNumber keeps starting at the last number.
Appreciate any Help

Cheers


Gerry Marshall
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi,

Couple of ways to fix it.

If you've data in the table:

1) Go into design view
2) Delete the 'AutoNumber' column
3) Save the table
4) Re-create the 'AutoNumber' column.
5) Switch back into normal view and check the records are correct.

If you've NO data,

1) From the DB window, select the table in question.
2) Edit > Copy
3) Edit > Paste
4) In the 'Paste Table As' dialog that appears:
a) Call the table the same, but add "1" on the end of the table name.
b) Select "Structure Only" in the 'Paste Options' section.
5) Delete the original table
6) Rename the newly-created table to the original table name.

HTH,

Ad
 
Upvote 0
Hullo. After having deleted your test data, compact the database, and the autonumber will start from 1 again. Keep in mind, you should never have an autonumber field be visible to, or have meaning to, the users, for specifically this reason, amongst others.

HTH (y)

P
 
Upvote 0
Hello

Thanks everyone for your help, it is much appreciated. I have never failed to get an answer to any problem that I have had in this forum, and it is wonderful that people with so much knowledge are willing to share that knowledge with others.

Thank You

Gerald Marshall
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,199
Members
451,688
Latest member
Gregs44132

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top