I'm pretty sure there's a property in the table design view where you can enter the starting number. Same place where you select the size of the field, input masks, etc.
No, Les, you're thinking of some other database system.
Assuming the table is empty, here's what to do:
First, if the table has ever had any rows in it, delete the rows (if any) and compact your database.
Next, make a copy of the table, saving it as 'Temp'. Open Temp in Design View and change the Autonumber to just Number. Then open it in Datasheet View and enter a number one less than your desired starting number in that field. Enter data into any other fields that are required, and save the record.
Next, create an Append query that copies all fields from Temp to your table, and run it.
Finally, open your table and delete the single row. (You can delete the 'Temp' table and the Append query, too.)
The next record added to your table will have the starting number. Note: DON'T compact your database again before you start adding records to this table.
------------------
Having said all that, I now have to advise you not to do this. You really shouldn't attach any meaning to the value of an Autonumber field. There is no way to guarantee that numbers will be consecutive, and in a multiuser database they may not even be sequential. You shouldn't get any duplicates, but you certainly can get gaps in the numbers.
The Autonumber feature is designed only for uniqueness, not meaning. End users should never even see them.
Rick Sprague
Want the best answers? See faq181-2886 To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.