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  

How to reset autonumber in access 2002/Xp



 
 
Thread Tools Display Modes
  #1  
Old August 7th, 2004, 02:54 AM
greatmacoy
external usenet poster
 
Posts: n/a
Default How to reset autonumber in access 2002/Xp

Hi,

I've been using access for years already. In MS Access
2000, if you deleted the last record in a table and you
want to reset the autonumber to the next value (from 10,
followed by 11 and not 12 or any other value, all you have
to do is to compact the database.

I tried doing the same with a MS Access Xp database but it
din't work. Why? How can I reset the value?
  #2  
Old August 7th, 2004, 03:08 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default How to reset autonumber in access 2002/Xp

For this version of ACCESS, only way I know is to copy all the data to a
temporary table, delete the data from the original table, compact the
database, and then append the data from the temporary table back into the
original table.

--

Ken Snell
MS ACCESS MVP

"greatmacoy" wrote in message
...
Hi,

I've been using access for years already. In MS Access
2000, if you deleted the last record in a table and you
want to reset the autonumber to the next value (from 10,
followed by 11 and not 12 or any other value, all you have
to do is to compact the database.

I tried doing the same with a MS Access Xp database but it
din't work. Why? How can I reset the value?



  #3  
Old August 7th, 2004, 03:18 AM
greatmacoy
external usenet poster
 
Posts: n/a
Default How to reset autonumber in access 2002/Xp

Thanks Ken,

So, with MS Access Xp, the autonumber field will not reset
like the earlier versions if the table has data in it.

greatmacoy
  #4  
Old August 7th, 2004, 12:50 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default How to reset autonumber in access 2002/Xp

If any other (child) tables depend on entries in the table you are trying to
reset for a foreign key, they will lose their (correct) connection when you
reset/renumber.

Autonumbers are great unique row identifiers, but as such, rarely need to be
seen. Why do you care what value the autonumber field holds?

--
Good luck

Jeff Boyce
Access MVP

  #5  
Old August 7th, 2004, 06:18 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default How to reset autonumber in access 2002/Xp

That is correct. Of course, as Jeff asks, why should this be necessary to
do? Autonumbers should not be exposed to the user in any way, so the actual
values should be immaterial.

--

Ken Snell
MS ACCESS MVP

"greatmacoy" wrote in message
...
Thanks Ken,

So, with MS Access Xp, the autonumber field will not reset
like the earlier versions if the table has data in it.

greatmacoy



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access License In Terminal Server JIM.H. General Discussion 9 July 19th, 2004 12:32 AM
Error while running Access MDE Hemil General Discussion 2 June 21st, 2004 01:03 PM
Autonumber -Reset to a lower number Mike General Discussion 2 June 5th, 2004 01:54 AM
Reset autonumber to zero joseph Database Design 1 May 31st, 2004 03:51 AM
reset autonumber value in table Database Design 0 April 29th, 2004 02:11 PM


All times are GMT +1. The time now is 12:52 PM.


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