A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

2007 Being Weird with AutoNumber



 
 
Thread Tools Display Modes
  #1  
Old September 18th, 2008, 05:31 PM posted to microsoft.public.access.tablesdbdesign
Sarah0824
external usenet poster
 
Posts: 32
Default 2007 Being Weird with AutoNumber

I have a database that was created in 2003. When we switched to 2007, it
started acting weird with the primary key field in several tables. They are
set to autonumber. When we would add a new record, Access went back and used
a deleted record's number. That was fine becuase it was not creating a
duplicate primary key field. However, for the next new record, it would
number incrementally from the reused number, and then it was creating a
duplicate primary key so we could not enter a new record.

To fix this, I ran an eppend query to bump the autonumber up to a new
starting point. It appeared to be working, but now its up to its old tricks
again. The only thing I have done other than typing a new record in, is
using a different append query to restore a record that was appended to a
different table a while ago.

I hope I have explained this clearly enough. Has anyone else had this
problem with 2007? Is there an easy fix?

Please help!! Thank you.
  #2  
Old September 18th, 2008, 05:54 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default 2007 Being Weird with AutoNumber

If this is an attached table, the problem you describe occurs in all recent
versions of Access (including 2007.)

More info in:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.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.

"Sarah0824" wrote in message
...
I have a database that was created in 2003. When we switched to 2007, it
started acting weird with the primary key field in several tables. They
are
set to autonumber. When we would add a new record, Access went back and
used
a deleted record's number. That was fine becuase it was not creating a
duplicate primary key field. However, for the next new record, it would
number incrementally from the reused number, and then it was creating a
duplicate primary key so we could not enter a new record.

To fix this, I ran an eppend query to bump the autonumber up to a new
starting point. It appeared to be working, but now its up to its old
tricks
again. The only thing I have done other than typing a new record in, is
using a different append query to restore a record that was appended to a
different table a while ago.

I hope I have explained this clearly enough. Has anyone else had this
problem with 2007? Is there an easy fix?

Please help!! Thank you.


  #3  
Old September 18th, 2008, 07:38 PM posted to microsoft.public.access.tablesdbdesign
Sarah0824
external usenet poster
 
Posts: 32
Default 2007 Being Weird with AutoNumber

Thank you for your quick response. It is not an attached table, but I will
try what you have suggested. I've just never seen this before so I thought
it might have been something that occurred from switching to 2007.

Thanks again.

"Allen Browne" wrote:

If this is an attached table, the problem you describe occurs in all recent
versions of Access (including 2007.)

More info in:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.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.

"Sarah0824" wrote in message
...
I have a database that was created in 2003. When we switched to 2007, it
started acting weird with the primary key field in several tables. They
are
set to autonumber. When we would add a new record, Access went back and
used
a deleted record's number. That was fine becuase it was not creating a
duplicate primary key field. However, for the next new record, it would
number incrementally from the reused number, and then it was creating a
duplicate primary key so we could not enter a new record.

To fix this, I ran an eppend query to bump the autonumber up to a new
starting point. It appeared to be working, but now its up to its old
tricks
again. The only thing I have done other than typing a new record in, is
using a different append query to restore a record that was appended to a
different table a while ago.

I hope I have explained this clearly enough. Has anyone else had this
problem with 2007? Is there an easy fix?

Please help!! Thank you.



  #4  
Old September 19th, 2008, 03:45 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default 2007 Being Weird with AutoNumber

In Access 2000 they tried to make Autonumbers better, and
every version since has been broken. They made repeated
attempts to fix the problems, short of just going back and
removing the broken features, and what we have now is the
best they could do: it doesn't normally cause random corruption,
it normally only causes predictable errors like you are seeing..

If it is worse in Access 2007, it means that they have had
another go at trying to fix it. Are you using an MDB, still
in Access 2003 format? You can still open it in Access 2003?

(david)


"Sarah0824" wrote in message
...
I have a database that was created in 2003. When we switched to 2007, it
started acting weird with the primary key field in several tables. They

are
set to autonumber. When we would add a new record, Access went back and

used
a deleted record's number. That was fine becuase it was not creating a
duplicate primary key field. However, for the next new record, it would
number incrementally from the reused number, and then it was creating a
duplicate primary key so we could not enter a new record.

To fix this, I ran an eppend query to bump the autonumber up to a new
starting point. It appeared to be working, but now its up to its old

tricks
again. The only thing I have done other than typing a new record in, is
using a different append query to restore a record that was appended to a
different table a while ago.

I hope I have explained this clearly enough. Has anyone else had this
problem with 2007? Is there an easy fix?

Please help!! Thank you.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.