Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Number help

Status
Not open for further replies.

realtallgal

IS-IT--Management
Dec 10, 2008
20
US
I using autonumber, but it is starting at 6299978, rather than 1. It is the first record in my database. Why is it doing this?
 
Have there been previous record in the table that have now been deleted?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
You can also check to see if the New Values lines under the General Tab in the table design view is set to Increment and not Random.
 
Yes I checked to make sure it wasn't on random. Thanks!
 
If you want it to start from 1 and you're sure the current value of the field isn't used by anything you could have a look here to reset it.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
SQL code:
ALTER TABLE yourTable ALTER COLUMN yourAutoNumberField COUNTER(1,1);

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
FOr some reason it started back at "1" now, but its not numbering as it suppose to. I wanted it to start numbering at 1 with the latest date first... so as new records are entered they would be in order... for example 7/8/2008 is number 159, and 12/10/2008 is number 1.. how do I get the autonumber to autonumber according to my date sort?
 
how do I get the autonumber to autonumber according to my date sort?
An autonumber has no meaning other than unicity, dot.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
An autonumber has no meaning other than unicity, dot. What does this mean.. laymen terms if possible.. thanks!
 
You shouldn't care what the autonumber is. It's one and only purpose is to provide a unique value. If it is supposed to be some sort of meaningful information, you should use something else, possibly write your own number generation function.

Joe Schwarz
Custom Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top