Autonumbering Field

  • Thread starter Thread starter robot
  • Start date Start date
R

robot

Hello,

I have an Access XP table with 10000 records and 5 fields, with the first
field being an autonumber field.

I have also an Excel worksheet with 4 suitable columns. So I add an empty
column to my Excel worksheet, then copy the five columns and paste into the
Access table, so that the empty column is pasted to the autonum field.

However, the autonum field of the table does not increment by 1, but jump
from 10000 to 12400!

I would like the autonum to increment normally.
I have tried compacting/repairing the mdb, but to no avail. Help would be
very much appreciated.
 
robot said:
Hello,

I have an Access XP table with 10000 records and 5 fields, with the first
field being an autonumber field.

I have also an Excel worksheet with 4 suitable columns. So I add an empty
column to my Excel worksheet, then copy the five columns and paste into the
Access table, so that the empty column is pasted to the autonum field.

However, the autonum field of the table does not increment by 1, but jump
from 10000 to 12400!

I would like the autonum to increment normally.
I have tried compacting/repairing the mdb, but to no avail. Help would be
very much appreciated.

Try hiding the autonumber column in your table datasheet and then just pasting
the four columns from Excel.
 
robot said:
Hello,

I have an Access XP table with 10000 records and 5 fields, with the
first field being an autonumber field.

I have also an Excel worksheet with 4 suitable columns. So I add an
empty column to my Excel worksheet, then copy the five columns and
paste into the Access table, so that the empty column is pasted to
the autonum field.

However, the autonum field of the table does not increment by 1, but
jump from 10000 to 12400!

I would like the autonum to increment normally.
I have tried compacting/repairing the mdb, but to no avail. Help
would be very much appreciated.

The simple answer is autonumber is not the tool for what you want.
Autonumber does not provide sequential numbers, it provides unique numbers,
that MAY be in sequence.

A temp fix would be to compact and repair your database and that may fix
it for a while

The real fix is to put the numbers in manually or using some VBA code.
I am not sure what you really need to do, but maybe you could use Excel to
add the numbers, as it has a very nice sequential numbering feature.
 
Thanks for your reply, Rick.

I try hiding the autonum column before pasting, but that doesn't work
either.
 
Why? As in, "why do you care what the Autonumber value is?" As suggested
in another response, autonumber data type is not guaranteed sequential and,
as suggested in the tablesdbdesign 'group frequently, isn't really intended
for "human consumption".

What are you trying to accomplish with the autonumber column? Unique row
identification (it does this already)?
 
Back
Top