473,387 Members | 3,810 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,387 software developers and data experts.

Autonumber strange behavior?

A record of a table with an autonumber field was accidentally deleted. From
the backup table I made a new table with only the deleted record. Then with
an add query I added that record to the original table. After that, when
adding a new record, the autonumber continued with the last ID value (from
the add query) + 1 there by overriding already existing records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john
Oct 2 '07 #1
5 1759
This is a known bug in JET.

See:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html

The article describes the causes, and how to reset the Seed of the
AutoNumber.

--
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.

"john" <hg*@neckso.comwrote in message
news:31***************************@cache110.multik abel.net...
>A record of a table with an autonumber field was accidentally deleted. From
the backup table I made a new table with only the deleted record. Then with
an add query I added that record to the original table. After that, when
adding a new record, the autonumber continued with the last ID value (from
the add query) + 1 there by overriding already existing records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john
Oct 2 '07 #2
"john" <hg*@neckso.comwrote in message
news:31***************************@cache110.multik abel.net...
>A record of a table with an autonumber field was accidentally deleted. From
the backup table I made a new table with only the deleted record. Then with
an add query I added that record to the original table. After that, when
adding a new record, the autonumber continued with the last ID value (from
the add query) + 1 there by overriding already existing records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john
Don't include the autonumber field in the append query. That way Access will
assign new autonumbers to all incoming records.

Oct 2 '07 #3
Thanks.
john

"Allen Browne" <Al*********@SeeSig.Invalidschreef in bericht
news:47**********************@per-qv1-newsreader-01.iinet.net.au...
This is a known bug in JET.

See:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html

The article describes the causes, and how to reset the Seed of the
AutoNumber.

--
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.

"john" <hg*@neckso.comwrote in message
news:31***************************@cache110.multik abel.net...
>>A record of a table with an autonumber field was accidentally deleted.
From the backup table I made a new table with only the deleted record.
Then with an add query I added that record to the original table. After
that, when adding a new record, the autonumber continued with the last ID
value (from the add query) + 1 there by overriding already existing
records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john

Oct 2 '07 #4
"Stuart McCall" <sm*****@myunrealbox.comschreef in bericht
news:fd*******************@news.demon.co.uk...
"john" <hg*@neckso.comwrote in message
news:31***************************@cache110.multik abel.net...
>>A record of a table with an autonumber field was accidentally deleted.
From the backup table I made a new table with only the deleted record.
Then with an add query I added that record to the original table. After
that, when adding a new record, the autonumber continued with the last ID
value (from the add query) + 1 there by overriding already existing
records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john

Don't include the autonumber field in the append query. That way Access
will assign new autonumbers to all incoming records.
Since the number of this deleted record was already 'given out' to third
parties as well I wanted it to be added with the original number.

john
Oct 2 '07 #5
"john" <hg*@neckso.comwrote in message
news:9f***************************@cache100.multik abel.net...
"Stuart McCall" <sm*****@myunrealbox.comschreef in bericht
news:fd*******************@news.demon.co.uk...
>"john" <hg*@neckso.comwrote in message
news:31***************************@cache110.multi kabel.net...
>>>A record of a table with an autonumber field was accidentally deleted.
From the backup table I made a new table with only the deleted record.
Then with an add query I added that record to the original table. After
that, when adding a new record, the autonumber continued with the last ID
value (from the add query) + 1 there by overriding already existing
records.

Is this WAD?

What should be best to do in such a situation?

Thanks,
john

Don't include the autonumber field in the append query. That way Access
will assign new autonumbers to all incoming records.

Since the number of this deleted record was already 'given out' to third
parties as well I wanted it to be added with the original number.

john
Ah. Misunderstood your question. Sorry. I see Allen's answered it (spot on
as usual!).
Oct 2 '07 #6

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

Similar topics

17
by: Alan Carter | last post by:
http://www.mvps.org/access/tencommandments.htm Thou shalt not use Autonumber if the field is meant to have meaning for thy users. Why? Alan
16
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number...
4
by: Vladislav | last post by:
My customers have reported strange behaviour of the locally used modules for running the register on stroke patients, specifically, adding new patient to the register. When analising a sample, I...
1
by: Alexander Inochkin | last post by:
Hi! I found same strange behavior of ASP.NET. It is possible this is the bug. Follow the steps:
21
by: MLH | last post by:
I have an A97 database table (tblCorrespondence] in a database installed at 2 sites. The table's key field is not a natural key - its an autonumber field. Here are the values at the 2 sites....
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
1
by: jason.teen | last post by:
Hi, Curerntly I have designed my table in MS Access with a column of "RuleID" and is set to (autonumber) tblRule: RuleID | Name ------------------------------- 1 ...
11
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.