473,441 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

Restarting Autonumber Fields

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
7 1914
Stwange
126 Expert 100+
Clear the tables, then try:
Tools -> Database Utilities -> Compact & Repair Database

That should do the trick.
Sep 3 '07 #2
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
14,534 Expert Mod 8TB
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
Repair database includes the compact feature.
Thanks, but how do I access the repair function?

Robert
Sep 6 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
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
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
14,534 Expert Mod 8TB
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

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

Similar topics

1
by: John | last post by:
Hi I have linked a master and a detail table in a 'make-table' query. Both tables have their own autonumber id fields. I am getting the 'Resultant table not allowed to have more than one...
3
by: Ilan Sebba | last post by:
I have a 'supertype' table with only one field: autonumber. Call this table the 'parent' table. There are two subtypes, 'androids' and 'martians'. Martian have only one thing in common: they give...
12
by: deko | last post by:
Is there a way to reset the AutoNumber sequence? I have several tables that use the AutoNumber field as the Primary Key, and I'd like to somehow do an Import/Export that will make remove the...
3
by: Danny | last post by:
I am doing the TransferText method to import a tab delimited file. I am using a saved specification. DoCmd.TransferText acImportDelim, "myinputspec", "tblnames", File, True no autonumber ID is...
35
by: Traci | last post by:
If I have a table with an autonumber primary key and 100 records and I delete the last 50 records, the next record added would have a primary key of 101. Is there any way to have the primary key...
26
by: jimfortune | last post by:
Sometimes I use Autonumber fields for ID fields. Furthermore, sometimes I use those same fields in orderdetail type tables. So it's important in that case that once an autonumber key value is...
4
by: Apple | last post by:
1. I want to create an autonumber, my requirement is : 2005/0001 (Year/autonumber), which year & autonumber no. both can auto run. 2. I had create a query by making relation to a table & query,...
4
by: Lyn | last post by:
Hi, Is there an "easy" way to write a full record (all fields) using "INSERT INTO..." into a table which has an AutoNumber field? Normally, to write a full new record I would use: INSERT INTO...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.