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 can make the autonumber field start at a specific value by using an append query. For example, if you want the autonumber field to start at 100, create an append query and append the value 99 into the autonumber field of the table.
See
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
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.
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
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.