By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

Restarting Autonumber Fields

P: 21
I am using Access 2007 and have developed a small database application with three main tables. During the development stage I trialled the forms, relationships, reports, etc using dummy data. It now works to my satisfaction, so I tried to clear out all the dummy data so that I could start again with the real data for the application. I deleted all records from the tables, but when I tried to enter new data the fields which are of type Autonumber continued to number from where the dummy data left off, instead of starting again from 1. These fields are my primary keys for the tables and are used primarily (only?) to set up the relationships between the tables. They are also useful for giving me a quick total of the number of records in each table. However it is disconcerting that they are "wrong".

This is not a major problem since I can get total record numbers in other ways, and the annoying Autonumber fields can be set to Not Visible on my forms so that they are not distracting. But it would be useful if I could get these fields to restart from 1. Is there a way to do this, please?

Thanks in advance for any advice.

Robert
Sep 3 '07 #1
Share this Question
Share on Google+
7 Replies


Expert 100+
P: 126
Clear the tables, then try:
Tools -> Database Utilities -> Compact & Repair Database

That should do the trick.
Sep 3 '07 #2

P: 21
Clear the tables, then try:
Tools -> Database Utilities -> Compact & Repair Database

That should do the trick.

Thanks, but this seems to apply to Access 2003, and it's different in 2007. There doesn't appear to be a Compact feature any more.

Robert
Sep 3 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Thanks, but this seems to apply to Access 2003, and it's different in 2007. There doesn't appear to be a Compact feature any more.

Robert
Repair database includes the compact feature.
Sep 5 '07 #4

P: 21
Repair database includes the compact feature.
Thanks, but how do I access the repair function?

Robert
Sep 6 '07 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Thanks, but how do I access the repair function?

Robert
I believe you can find it under the Microsoft Office button
Sep 6 '07 #6

P: 21
I believe you can find it under the Microsoft Office button
Yes, thanks. Under the Microsoft Office button, then "Manage" brings up "Compact and Repair".

Thans again

Robert
Sep 6 '07 #7

MMcCarthy
Expert Mod 10K+
P: 14,534
Yes, thanks. Under the Microsoft Office button, then "Manage" brings up "Compact and Repair".

Thans again

Robert
No problem Robert. Glad you found it.
Sep 6 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.