Re: Making an autonumber field start at a set number
- From: "Larry Linson" <bouncer@xxxxxxxxxxxxx>
- Date: Mon, 30 Jul 2007 23:16:44 GMT
"RASTUS" <rcuf@xxxxxxxxxxx> wrote
I am constructing an order number and a Job number based database and I
want
the order numbers to automatically increment to the next number, I
currently
have used a combined key to achieve this but don't know how to make both
parts of the key display on the form and don't know how to make the number
increment starting from a given number say 550000, can anyone help,
possibly
I should not use the key field to achieve the desired effect?
You should not use an Autonumber with the anticipation that it will always
increment monotonically as you normally see. There are a number of
situations when that will not be so. The intent of Autonumbers is that they
be unique, not in a particular sequence, so the best advice you can get is
to use autonumbers for identifying records in tables -- internally in your
database, but not ever displaying them to the users -- and to create your
own identifying number about which you have particular expectations or
requirements about the value.
In this regard, the DMax domain aggregate function is useful, and possibly
use of Access Transactions. Searching the archives of this and other Access
newsgroups at http://groups.google.com with various related search words
should give you enough information to start.
Larry Linson
Microsoft Access MVP
.
- Follow-Ups:
- Re: Making an autonumber field start at a set number
- From: RASTUS
- Re: Making an autonumber field start at a set number
- References:
- Making an autonumber field start at a set number
- From: RASTUS
- Making an autonumber field start at a set number
- Prev by Date: Re: How to set Tools Options settings and View Toolbars settings via VBA
- Next by Date: Re: Making an autonumber field start at a set number
- Previous by thread: Making an autonumber field start at a set number
- Next by thread: Re: Making an autonumber field start at a set number
- Index(es):
Relevant Pages
|