AuntoNumber Question

B

Bill

Hi All,

I have to do some work where I need to copy some original data from a
existing table into another identical test table in another database. The
tables contain a 'ref' field which is an incremental autonumber. I am sure
that when I have done this sort of thing in the past I have subsequently
discovered that the autonumber values in the 'ref' field had changed.

I think that instead of preserving the pasted 'ref' values they had changes
and seemed to have started from where the last highest value had stopped,
even though all the data in the table into which the data was being pasted
had been deleted.

Can anyone advise how I avoid this please because I now need to preserve the
original ref values.

Ta.
Bill.
 
A

Armen Stein

Hi All,

I have to do some work where I need to copy some original data from a
existing table into another identical test table in another database. The
tables contain a 'ref' field which is an incremental autonumber. I am sure
that when I have done this sort of thing in the past I have subsequently
discovered that the autonumber values in the 'ref' field had changed.

I think that instead of preserving the pasted 'ref' values they had changes
and seemed to have started from where the last highest value had stopped,
even though all the data in the table into which the data was being pasted
had been deleted.

Can anyone advise how I avoid this please because I now need to preserve the
original ref values.

Ta.
Bill.

In Access tables, an Append query that includes the Autonumber field
will preserve the values. Other methods (copy/paste, recordset.addnew,
etc.) will generate a new Autonumber values.
 
B

Bill

In Access tables, an Append query that includes the Autonumber field
will preserve the values. Other methods (copy/paste, recordset.addnew,
etc.) will generate a new Autonumber values.

That explains it!!!
Many thanks Armen.
Bill.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top