Import data into a table with an autonumber field

M

Martin Watts

I wish to import data from an earlier version of a database I have been
developing into the latest version. The problem is that one of the fields
is an autonumber field. While developing the database I changed the
autonumber field and added a primary key as it allowed me to manipulate data
more easily to test what I had done. Trouble is that I can't change it
back. Some records from the older version of the database have been deleted,
so the autonumber field data is not necessarily sequential.

Access does not seem to want to let me import data into an autonumber field
without putting in it's own autonumber which are sequential and therefore
not the same as the original data, which is important as this is part of a
relationship.

How should I do it?

TIA.

Martin Watts
 
P

Pat Hartman

You need to create a query. The query should select all the columns from
the old version of the table and append them to the new table. Be sure to
map the existing unique numeric number to the new table's autonumber field.
Append queries are the only place where you can supply a value for an
autonumber field.

If this feature didn't exist, it would be impossible to convert any existing
data.
 
M

Martin Watts

Cheers for that Pat.

Regards.

Martin

Pat Hartman said:
You need to create a query. The query should select all the columns from
the old version of the table and append them to the new table. Be sure to
map the existing unique numeric number to the new table's autonumber field.
Append queries are the only place where you can supply a value for an
autonumber field.

If this feature didn't exist, it would be impossible to convert any existing
data.
 

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