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

Can the auto number be told to start at a particular number

Status
Not open for further replies.

julius1

Technical User
Oct 31, 2002
142
US
Morning,
I am trying to combine 2 databases, the problem is they are both auto number. I need to see if I can make one start at a number so when I copy them into each other they do not error out with the key. Any one know of a way to do that?
Thanks
 
You should also check out the FAQs in the various Access forums for more explicit techniques.

However, I always discourage people from trying to make Autonumbers have more meaning than just an arbitrary identifier. They weren't designed for that, and there are problems. For example, if you start to create record 116 and then cancel before you've added it, the next record will be 117, and 116 will be skipped. For another example, if your last record was 223 and you delete it, then compact, the next record will be 223 (or lower) again.

In short, there's no guarantee that you'll get consecutive numbers from an Autonumber. They're only mostly consecutive.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Rick,

You're too polite. <G>

-0-0-0-0-0-

Julius,

I certainly don't mean that Rick should have been rude to you, just that I take a much stronger line on this: using autonumbers to record things that should be sequential is wrong and will cause problems. The actual number value in the autonumber field should not be held to mean anything at all. Access, when all SPs are applied to Office, will consistently and reliably generate unique autonumbers. But DO NOT count on them being sequential, as that will not be the case.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top