473,782 Members | 2,507 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reseting autonumber in MS Access 2003

Hi all,

I have found solution for previous Access versions (i.e. compacting
database) but it doesn't work with the 2003 version. Can someone
point me to a website or give me some hints. Thanks!!!!!!

KL

Apr 25 '07 #1
4 5374
Compacting should work if all data has been removed from the table.
If it doesn't you may need to update your JET 4:
http://support.microsoft.com/kb/239114

You can reset the Seed of the AutoNumber programmaticall y:
http://allenbrowne.com/func-ADOX.html#GetSeedADOX

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<la*****@gmail. comwrote in message
news:11******** **************@ r3g2000prh.goog legroups.com...
Hi all,

I have found solution for previous Access versions (i.e. compacting
database) but it doesn't work with the 2003 version. Can someone
point me to a website or give me some hints. Thanks!!!!!!

KL
Apr 25 '07 #2
On Apr 25, 10:26 am, lamk...@gmail.c om wrote:
Hi all,

I have found solution for previous Access versions (i.e. compacting
database) but it doesn't work with the 2003 version. Can someone
point me to a website or give me some hints. Thanks!!!!!!

KL
1. Delete the autonumber column
2. Compact the database.
3. Create a new autonumber column.

HTH
Bubbles

Apr 26 '07 #3
"bubbles" <bu*********@ho tmail.comwrote
1. Delete the autonumber column
2. Compact the database.
3. Create a new autonumber column.
That, unfortunately, works only if you are emptying the Table of Records, or
if you haven't used the autonumber column in relationships. At one time,
Compact and Repair, would reset the AutoNumber sequence to the next after
the highest-used number. Later versions would only reset to 0, if there
were no records in the Table.

But, if you eliminate the column, you "orphan" any Records in Related
Tables.

Larry Linson
Microsoft Access MVP
Apr 26 '07 #4
On Apr 27, 5:44 am, "Larry Linson" <boun...@localh ost.notwrote:
"bubbles" <bubbles....@ho tmail.comwrote
1. Delete the autonumber column
2. Compact the database.
3. Create a new autonumber column.

That, unfortunately, works only if you are emptying the Table of Records, or
if you haven't used the autonumber column in relationships. At one time,
Compact and Repair, would reset the AutoNumber sequence to the next after
the highest-used number. Later versions would only reset to 0, if there
were no records in the Table.

But, if you eliminate the column, you "orphan" any Records in Related
Tables.

Larry Linson
Microsoft Access MVP

You're right.
I had assumed that if he had wanted to reset the autonumber column,
then the table
would not be related to other tables.

Bubbles

Apr 27 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2872
by: Charles Robinson III | last post by:
The AutoNumber sequence in my database is currently formatted as '000000'. When a new record is created, the AutoNumber would go from 000001, 000002, 000003 and so on. I want to track via AutoNumber the year each record was created. Basically, if a record was entered in 2003, the AutoNumber would look something like 03-000001 and then 03-000002, and so on. When a record would be entered in 2004, the AutoNumber would look something...
1
1754
by: BT Openworld | last post by:
I've just had to upgrade to Access 2003. Our company's main sales database started in Access V1.0 and has progressed through V2.0 and 97 without problems. I've converted it to 2003 format and have been going through a process of testing it. To my horror I noticed that seemingly without provocation, it has started re-using old Autonumber values. For example, I have an archive routine which removes completed sales enquiry records out of the...
1
1546
by: waschbaer2 | last post by:
Hi! What's the proper Visual Basic for Applications (VBA) code for reseting the menu bar and the tool bar in Access. Thanks in advance, Markus
4
6842
by: Ed_P | last post by:
Hello I currently have a Access 2003 database, I am able to add a record to it, and the CustomerID field (which is auto generated by the Database) is correctly filled in by the Database. I am now trying to figure out a way to retreive this number to use it in another Table of the Same Database. Anyone have any examples or resources that I can use to find the best way that I can accomplish this task? Any help/resources that you can provide...
11
4498
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any AutoNumber* fields in them. Correct me if I'm wrong, but I'm assuming this means that I cannot now alter these existing Access tables and change their primary key to an "AutoNumber" type. If I'm right about this, I need some suggestions as to the...
2
2830
by: Hiyella2 | last post by:
Hello, I have a problem with a table in my MS Access 2003 table. The primary key of this table is an autonumber field set to a Long Integer, Yes - no duplicates. The autonumber made it to 10252. Now when I try to add a new record the autonumber started over at 1. Therefore I am getting an error message saying that it can't save this new record because it contains duplicate values. My best guess is that I need to reset the autonumber...
9
11232
by: Tom_F | last post by:
To comp.databases.ms-access -- I just discovered, to my more than mild dismay, that some tables in my Microsoft Access 2003 database have duplicate numbers in the "AutoNumber" field. (Field Size is set to "Long Integer", and New Values is set to "Increment".) I know that an old version of the Jet database engine can cause this problem, but my version of msjet40.dll is 4.0.8618.0, which is supposedly bug-free in this respect. I am...
2
2823
mkremkow
by: mkremkow | last post by:
Access 2003 on XP Someone here at work deleted a record (&$%^&*&!!!) and screwed up the Autonumber "Job ID" field . I need to reset the Autonumber field back to it's original numbers and still keep all the data in the table assigned to the correct Job ID (1-155). I copied everything from the table to Excel for safekeeping. I deleted the Autonumber field and went through the steps (http://support.microsoft.com/kb/812718 ) but when I...
6
11763
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 contents of the form is inserted into the MS Access database. The Customer table in the database already has 30 records (with CustomerIDs 1 - 30) in it (from when the database was first created). The CustomerID field in the database is an...
0
9641
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10146
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.