Re: Coercing AutoNumber Value?
- From: DavidB <jebva@xxxxxxxxx>
- Date: Fri, 22 Jun 2007 09:28:58 -0700
On Jun 21, 5:33 pm, PeteCresswell <PeteCr...@xxxxxxxxx> wrote:
Got a table with "RecordID"=AutoNumber=PrimaryKey.
Call it "tblIssuerRating".
Ran a query that appends to that table from a work table.
Inadvertantly appended from the work table's "RecordID", which was not
autonumber and, in fact, contained a zero.
The query ran successfully and I would up with a tblIssuerRating
record where .RecordID.Value=0.
After that, tblIssuerRating's autonumber increment was messed up: kept
trying to start with RecordID=1.
I fixed the offending query, and all is well.
But it doesnt' seem like JET should allow something like this to
happen in the first place.
Should this really be possible?
My first question to you would be "why do you want to do this". It
APPEARS that you may be falling into the trap of thinking that an
incremental autonumber field can be used as a record number when in
fact it 100% CANNOT be relied upon to do that. Autonumber is NOT
intended to be a record number or to be able to count records or
anything else what so ever. It is merely a way to give a unique value
to a field automatically. It has ZERO use for tracking ANYTHING. If
you are trying to use this autonumber field for ANYTHING meaningful at
all, you are heading for a database that will become unusable in short
order.
.
- Follow-Ups:
- Re: Coercing AutoNumber Value?
- From: (PeteCresswell)
- Re: Coercing AutoNumber Value?
- References:
- Coercing AutoNumber Value?
- From: PeteCresswell
- Coercing AutoNumber Value?
- Prev by Date: Access 2007 Split form - setting focus to datasheet
- Next by Date: Re: Setting up Access security preference
- Previous by thread: Re: Coercing AutoNumber Value?
- Next by thread: Re: Coercing AutoNumber Value?
- Index(es):
Relevant Pages
|