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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Autonumber -Reset to a lower number



 
 
Thread Tools Display Modes
  #1  
Old June 4th, 2004, 10:46 PM
Mike
external usenet poster
 
Posts: n/a
Default Autonumber -Reset to a lower number

I have an autonumber field which is the primary key linked to other tables. I want to set the autonumber field to a lower number i.e I started at 90000 and and now have exceeded 99999, six digits wont work for me. I want to reset to 50000. I have tried the append method, but the autonumber still increments from the highest number 100004
  #2  
Old June 5th, 2004, 12:30 AM
John Vinson
external usenet poster
 
Posts: n/a
Default Autonumber -Reset to a lower number

On Fri, 4 Jun 2004 14:46:05 -0700, "Mike"
wrote:

I have an autonumber field which is the primary key linked to other tables. I want to set the autonumber field to a lower number i.e I started at 90000 and and now have exceeded 99999, six digits wont work for me. I want to reset to 50000. I have tried the append method, but the autonumber still increments from the highest number 100004


I'd suggest that you not use an Autonumber for this purpose.
Autonumbers have one purpose, and one purpose ONLY: to provide an
(almost, except for occasional bugs) guaranteed unique identifier.
They are not editable and (as you can see) not readily controlled.

You might want instead to use a Long Integer field and use one of the
many VBA routines available to increment it. What is the largest value
currently in your table? Do you have a gap available in which to
insert numbers? What do you want to do with record 100003?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old June 5th, 2004, 01:54 AM
Joseph Meehan
external usenet poster
 
Posts: n/a
Default Autonumber -Reset to a lower number

Mike wrote:
I have an autonumber field which is the primary key linked to other
tables. I want to set the autonumber field to a lower number i.e I
started at 90000 and and now have exceeded 99999, six digits wont
work for me. I want to reset to 50000. I have tried the append
method, but the autonumber still increments from the highest number
100004


I agree with John. You are trying to use autonumber for something not
intended. There are some work arounds that might do what you want, but it
is far better to never use an autonumber where the user is going to see it.
It should be used for internal (to Access) only.



--
Joseph E. Meehan

26 + 6 = 1 It's Irish Math



 




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 07:22 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.