Importing

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

Guest

Hello,

I have a database I am now updating. I have created a new database with
slightly different structure. I have two tables on the old system linked by
an autonumber. I want to import that data into two new tables linked by an
autonumber.

My problem is how do i do it as it looses the autonumber link.

Hope you can help.

james
 
Can you explain a bit more what you mean by "linked by an autonumber"?

If it's the common situation of a one-to-many relationship where the
primary key of the "one" table is an Autonumber and the foreign key of
the "many" table is a Long, try this:

1) If you have set a relationship between the tables in the new
database, delete it.

2) Delete any records in the two tables in the new database.

3) Compact the new database (among other things this "resets" the
autonumber fields).

4) In the new database, create a linked table connected to the "one"
table in the old database. Use an append query to move the data into the
new table (the data from the old autonumber field goes into the new
autonumber field).

5) Repeat for the "many" table.

6) Create (or re-create) the relationship between the new "one" and
"many" tables.

7) Delete the linked tables.
 
Back
Top