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

How?- Update query to increase an auto number by 2000

Status
Not open for further replies.

justagrunt

Technical User
Oct 10, 2002
132
Hi,
There exists a database which the powers that be have decide to make some changes to.
There exists 52 entries which were appended to the database to create it.
The old numbering is out by 2000 and there are 52 entries.
What is the criteria or Update to syntax to take those existing numbers and add 2000 to them.
The field is an auto number field.
A new start has been decided at 3060 of which the exiting numbers are 1058, 1057 etc.I want to add 2000 to these numbers and then create the new start point which will be 3060. 1059 does not exist.
Ta
Bill
 
Do you realize that an autonumber is generally not used where it can be seen so it shouldn't make any difference what the value is? Deleting records will cause the autonumber to "skip".

However, if you create a new table with the same structure but no records, you can append from your existing table into the new table while adding any constant number to the old autonumber.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Ta,
Create a new table same structure -ok.
Append all 52 entries to the new table by increasing number by 2000 - ????.
Please assist.
Where do I add the syntax / criteria statemnet that allows the append numbers to increase by 2000 - from 1058 to 3058 etc.
Your assistance very much appreciated.
Bill
 
Hi,

Access Help provides a clear outline of the procedure to change the starting value of an autonumber. Look under: "Change the starting value of an incrementing AutoNumber field"

Cheers,
Bill
 
Regarding appending... Create an append query with your original table as the source and your new table as the target. Add all the fields so they all be appended. Change the expression of the Autonumber field/column to:
[AutonumField]+2000

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Thanks Guys,
Help very appreciated.
Success.
Many many thanks
Warm Regards
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top