473,568 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Autonumber Duplicates Problem

Hi:

I have a table which is indexed on an auto number (supposedly unique for each record). For
reasons I cannot explain, I have started to encounter a problem with duplicate auto
numbers. The numbers went up to 250, and the suddenly the system started to try and
generate numbers starting at 150. Because the auto numbers duplicated, the system now will
accept NO new records!!

Can someone tell me how to fix this, either by giving a new starting base (say 1000) or
some other technique. Also, if a nee starting base HOW do i set it?

Thanks..Im stuck!

JOhn Baker
Nov 12 '05 #1
11 2322
Hi John

This is a known problem with the autonumbers in Access 2000 and later. There
are 2 steps to fixing it.

1. Run the code in this link:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html
This reset the Seed of the Autonumbers, which fixes the immediate problem.

2. Download the latest service pack for your version of Office from
support.microso ft.com. This prevents the problems recurring.

--
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 Baker" <Ba******@Veriz on.net> wrote in message
news:s4******** *************** *********@4ax.c om...

I have a table which is indexed on an auto number (supposedly unique for each record). For reasons I cannot explain, I have started to encounter a problem with duplicate auto numbers. The numbers went up to 250, and the suddenly the system started to try and generate numbers starting at 150. Because the auto numbers duplicated, the system now will accept NO new records!!

Can someone tell me how to fix this, either by giving a new starting base (say 1000) or some other technique. Also, if a nee starting base HOW do i set it?

Thanks..Im stuck!

JOhn Baker

Nov 12 '05 #2
Thank you.

I have updated Access and reset the data base with an earlier version. Things appear to be
OK.

I am going to distribute this application to others in the not too distant future. Is it
likely that they will have the same problems (they have 2002 version with XP, I have 2000
with W98), and should I make the effort to update their systems with the patch too?"

Thanks for your help
John Baker

Allen Browne" <Al*********@Se eSig.Invalid> wrote:
Hi John

This is a known problem with the autonumbers in Access 2000 and later. There
are 2 steps to fixing it.

1. Run the code in this link:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html
This reset the Seed of the Autonumbers, which fixes the immediate problem.

2. Download the latest service pack for your version of Office from
support.micros oft.com. This prevents the problems recurring.


Nov 12 '05 #3
It would be a very good idea to insist that they have the latest service
pack for their version of Access.

On the Help | About screen in my open Access applications, I always display
the version of Access and of Jet. Then if the user is experiencing a
problem, they can tell me what versions they are using. The two text boxes
have this Control Source:
=fGetProductVer sion(SysCmd(9) & "msaccess.e xe")
=fGetProductVer sion(fReturnSys Dir() & "\msjet40.d ll")
and the API-call functions can be copied from:
http://www.mvps.org/access/api/api0065.htm
http://www.mvps.org/access/api/api0010.htm

If by "districute this application" you are considering generating a runtime
installation, there are additional issues with the different versions of
Windows.

--
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 Baker" <Ba******@Veriz on.net> wrote in message
news:ql******** *************** *********@4ax.c om...
Thank you.

I have updated Access and reset the data base with an earlier version. Things appear to be OK.

I am going to distribute this application to others in the not too distant future. Is it likely that they will have the same problems (they have 2002 version with XP, I have 2000 with W98), and should I make the effort to update their systems with the patch too?"
Thanks for your help
John Baker

Allen Browne" <Al*********@Se eSig.Invalid> wrote:
Hi John

This is a known problem with the autonumbers in Access 2000 and later. Thereare 2 steps to fixing it.

1. Run the code in this link:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html
This reset the Seed of the Autonumbers, which fixes the immediate problem.
2. Download the latest service pack for your version of Office from
support.micros oft.com. This prevents the problems recurring.

Nov 12 '05 #4
Allen:

I hate to tell you butb the problem has NOT been solved. Do you know som way I can reset
the seed for autonumber? Its still trying to issue autonumbers that duplicate the ones
already in the table!!

Im perplexed because it appeared to work yesterday.

Regards

John
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
It would be a very good idea to insist that they have the latest service
pack for their version of Access.

On the Help | About screen in my open Access applications, I always display
the version of Access and of Jet. Then if the user is experiencing a
problem, they can tell me what versions they are using. The two text boxes
have this Control Source:
=fGetProductVer sion(SysCmd(9) & "msaccess.e xe")
=fGetProductVer sion(fReturnSys Dir() & "\msjet40.d ll")
and the API-call functions can be copied from:
http://www.mvps.org/access/api/api0065.htm
http://www.mvps.org/access/api/api0010.htm

If by "districute this application" you are considering generating a runtime
installation , there are additional issues with the different versions of
Windows.


Nov 12 '05 #5
The code in this link illustrates how to set Properties("See d") of a Column
in a Table of the Catalog:
http://allenbrowne.com/ser-40.html

Running that code after installing the update should solve the problem.

--
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 Baker" <Ba******@Veriz on.net> wrote in message
news:31******** *************** *********@4ax.c om...
Allen:

I hate to tell you but the problem has NOT been solved. Do you know som way I can reset the seed for autonumber? Its still trying to issue autonumbers that duplicate the ones already in the table!!

Im perplexed because it appeared to work yesterday.

Regards

John
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
It would be a very good idea to insist that they have the latest service
pack for their version of Access.

On the Help | About screen in my open Access applications, I always displaythe version of Access and of Jet. Then if the user is experiencing a
problem, they can tell me what versions they are using. The two text boxeshave this Control Source:
=fGetProductVer sion(SysCmd(9) & "msaccess.e xe")
=fGetProductVer sion(fReturnSys Dir() & "\msjet40.d ll")
and the API-call functions can be copied from:
http://www.mvps.org/access/api/api0065.htm
http://www.mvps.org/access/api/api0010.htm

If by "districute this application" you are considering generating a runtimeinstallation , there are additional issues with the different versions of
Windows.

Nov 12 '05 #6
Allen:

I ran into the following error at compile time:

Dim Rst As DAO.Recordset
It said it was a user defined varaiable, and not defined.

Any thoughts on this?
Regards

John Baker
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
The code in this link illustrates how to set Properties("See d") of a Column
in a Table of the Catalog:
http://allenbrowne.com/ser-40.html

Running that code after installing the update should solve the problem.


Nov 12 '05 #7
You need a reference to the DAO library.

From the code window, choose References on the Tools menu.
Check the box beside:
Microsoft DAO 3.6 Library.

More info on references:
http://allenbrowne.com/ser-38.html

--
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 Baker" <Ba******@Veriz on.net> wrote in message
news:5q******** *************** *********@4ax.c om...
Allen:

I ran into the following error at compile time:

Dim Rst As DAO.Recordset
It said it was a user defined varaiable, and not defined.

Any thoughts on this?
Regards

John Baker
"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
The code in this link illustrates how to set Properties("See d") of a Columnin a Table of the Catalog:
http://allenbrowne.com/ser-40.html

Running that code after installing the update should solve the problem.

Nov 12 '05 #8
Allen:

I am totally perplexed. I have made the updates to Access, and run your routine.
Everything works fine until I Close th application, and reboot the system. At that point
the duplicate problem returns. You have been most helpful, and I am totally, utterly,
frustrated and have no idea as to what is happening or what I can do!
Regards

John Baker

"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
You need a reference to the DAO library.

From the code window, choose References on the Tools menu.
Check the box beside:
Microsoft DAO 3.6 Library.

More info on references:
http://allenbrowne.com/ser-38.html


Nov 12 '05 #9
John, re-reading this thread, I think you have Access 2000.
You have installed the service pack, so Help | About should show SP3?

Just to verify that the correct version of JET is running, search your hard
disk for msjet40.dll. You will probably find it in \windows\system 32, but
are there any other copies of this file on your drive? If there is another
copy in the Office folder or in Windows or somewhere on path, it is possible
that the wrong one is being loaded into memory.

After verifying that there is only one copy, right-click it in the Windows
Explorer and choose Properties. On the Version tab, what version do you see?
It should be 4.0.8015.0. If it is this version, then I'm at a loss to know
what to suggest further.

--
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 Baker" <Ba******@Veriz on.net> wrote in message
news:8g******** *************** *********@4ax.c om...
Allen:

I am totally perplexed. I have made the updates to Access, and run your routine. Everything works fine until I Close th application, and reboot the system. At that point the duplicate problem returns. You have been most helpful, and I am totally, utterly, frustrated and have no idea as to what is happening or what I can do!
Regards

John Baker

"Allen Browne" <Al*********@Se eSig.Invalid> wrote:
You need a reference to the DAO library.

From the code window, choose References on the Tools menu.
Check the box beside:
Microsoft DAO 3.6 Library.

More info on references:
http://allenbrowne.com/ser-38.html

Nov 12 '05 #10

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

Similar topics

2
2455
by: C L Humphreys | last post by:
Hi, I seem to have amassed a few thousand duplicates in an autonumber field. Is there a simple way of updating these to new numbers? Not sure if this is related - but I'm having problems searching for duplicates, with the error "invalid argument" popping up. Cheers, Chris
5
3782
by: JW | last post by:
Hi, This is really weird... I have a database that has an autonumber field. Records 1-70 were deleted. Various things have changed to the front end and a few extra fields added to the table. Now Access has decided to re-use 1-70 again!!! however this went unnoticed until it tried to have 2 x 71's !! Has anyone had this before / know a...
1
1529
by: Patrick Fleury | last post by:
We have a database which has recently started driving us nuts. It, and some of its ancestors, have been in use for about 8 years and, until last January, everything seemed fine. However, in the last couple of months, it has been sending messages demanding that it be repaired and compacted several times a week. This has never happened...
1
1848
by: Knut B. | last post by:
I have a problem with a database of concerts, where I recently tried to change the existing database with some new rows/categories and some new names on a few of the existing ones. I have an id field that is "autonumber", and this has become my problem. The original database had listed 54 concerts, with unique ID's. Now, the ID autonumber...
26
3786
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 assigned to a record that it doesn't change. Occasionally I find that due to corruption or an accidental deletion and restore of a record from a...
2
1747
by: Materialised | last post by:
Hi All, I am writing a program in C, which will be driving via a MS Access database. I am relitivly new to database design, so if anyone could help me with my issue I would be greatful. I have defined a database field to be a primary Key, this field is set to contain the AutoNumber data type. I would like to know if it is possible to...
8
15955
by: petebeatty | last post by:
I have created a SQL string the properly inserts a record in the table. However, the insert does not occur at the end of the table. Instead it inserts a record after the last record that I viewed. This would be OK, except it assigns a autonumber to be one greater than the last viewed record. This causes a duplicate autonumber. I know I...
2
2820
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...
9
11214
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,...
4
2344
imrosie
by: imrosie | last post by:
Hello All, (newbie)...I'm working on an Ordering app using the typical tables (customers, orders). I have a Search form to find existing customers prior to entering a new order. On the search form there's a combo control called 'custname' so that when a customer is located, the existing customer name is filled in and the account number goes...
0
7693
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...
0
7604
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...
0
8117
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...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5498
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
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
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.