Autonumber query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am using an append query to produce a table that has an
autonumber field which I use in a later function. Before
appending data to the table, the existing data is deleted
and the new data appended.

The problem with the autonumber is that it remembers the
last number of fields before deletion and the new data
will be assigned a start number following on from this so
your autonumber keeps getting bigger.

Is there a way to reset the autonumber field before
appending new data to the table so as to start fresh, ie
at 1 OR is there another way of producing a field similar
to autonumber where the numbers would start at 1 each time
you appended data.

I hope this makes sense.

Regards
IanF
 
Hi,


You can insert a record, specifying a value of zero for the autonumber
field, then, delete it. The next record to be append would receive the
number 1, etc. An autonumber can be so duplicated. An autonumber, alone,
does not imply uniqueness.



Hoping it may help,
Vanderghast, Access MVP
 
Ian

Why? As in "why do you care what the autonumber is?"

Autonumbers are intended to be used as (generally) unique row identifiers,
and are usually considered unfit for human consumption.

Are you letting humans look at your autonumbers?

More info, please...

Jeff Boyce
<Access MVP>
 
Hi Jeff,

No one is going to see the auto numbers but I was thinking
more in terms of the autonumber eventually becoming
massive - is there a limit to its size?

Regards
IanF
 
Hi Jeff,

No one is going to see the auto numbers but I was thinking
more in terms of the autonumber eventually becoming
massive - is there a limit to its size?

Bigger than you would ever have to worry about. When it hits the max it
will start using the negative values and you'd have to consume all of those
as well.
 
Back
Top