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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incremental Numbering

Status
Not open for further replies.

piovesan

Technical User
Jan 23, 2002
159
CA
thread701-1309127

I am trying to use the suggestion in the above thread but I keep getting the same number being populated in every record.... I have a table with 1000 records. I have a number field that I want to get incremental numbers updated starting at 16. So, I want the first record in the table to get a REC_ID = 16, the next to get REC_ID = 17, etc, etc........ but using the above thread, I keep getting 17 in every record............ any suggestions?
Thanks!
 
What have you tried with which data ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I have tried:

UPDATE yourTable
SET yourTable.field = 16+1;

which of course just updates every record to 17.
 
Thanks all......... I was only updating the records too.... not creating them...... but I had to start with 16 because I was appending these records eventually to another table that has an autonumber and 15 records currently in there.
The very, very simple work around I did was, I exported the table to excel and did the numbering there, then imported it back and appended to my other table......... very simple but worked!
Thanks again for your time!
 
I was appending these records eventually to another table that has an autonumber and 15 records currently in there
And, if you simple appended the new records, the autonumbers would have started with --- 16!


Randy
 
was appending these records eventually to another table that has an autonumber and 15 records currently in there

You cannot set the values in an autonumber field so it doesn't matter what numbers you have in the source table. Access will assign new autonumbers when you append records. In this case, as randy700 said, starting with 16.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top