98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » access+training - Primary key with high start number
access+training - Primary key with high start number
Resolved · Low Priority · Version Standard
Mark has attended:
Access Intermediate course
Access Advanced course
Access VBA course
Primary key with high start number
In a new database can I start a primary key autonumber on a number other than 1, I want to start it at 3000. If so how?
RE: Primary key with high start number
Hi Mark
Yes this is possible, if you follow the steps outlined below you will be able to do it.
1)Make sure that there is no primary key field set in your database table.
2)Create a new temporary table, within this table create a field with the SAME name as the id field in the original table. In this field enter a number 1 less than you require for your auto number start i.e. 2999.
3)Create a Query in design view and add both the tables.
4)Right mouse click in the grey area where the two tables are shown within the query window. From the menu select Query Type and then Append Query.
5)Within the window that appears, select the original table (the table that you want the auto number to start at 3000) from the drop down list and click OK.
6)Select the one single field that you created in the new table so that it is added to the query. To do this, double click the field.
7)Run the query
8)Open up the original table and when you create a new row, you should see that it starts the numbering from 3000.
9)Set this field as the primary key
10)Delete the temporary table that you created.
Hope this helps
David
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Create a custom Close button on a FormBy default, Forms that you create in Access have a full set of control buttons, that is, a title bar with Minimize, Maximize and Close buttons in the top right-hand corner and a Control Menu in the top left-hand corner. |