General discussion

Locked

Access 2002 Transferdatabase Action

By hsackner ·
I created a macro in Access 2002 that imports a specific table from one access database to another. The table in question is in a relationship with another table on the second database. The name of the tables are the same in both databases. When importing into the second database, the table is renamed i.e Table1. I cannot delete the second table before importing because of the relationship. How can I import the table , using the same name and maintain the integrity of the database without deleteing the relationship?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Haris In reply to Access 2002 Transferdata ...

MS Access also alows link tables, that is, linking tables from one database to another. Linked tables are accessible in both databases and are updated automatically.

Click File -> Get External Data -> Link tables

Collapse -

by kschaumburg In reply to Access 2002 Transferdata ...

As you found out, the related fields do not have the same name but the related fields must have the same relationship key unless the primary key is an autonumber. I have found that this will link the tables without compromising the integrity of the databases and you do not have to delete the relationship.

Collapse -

by Haris In reply to Access 2002 Transferdata ...

hi,

If you delete the table before importing the new one it will be violation of the integrity rules. These rules are established for the very purpose that related data is not lost.

Your option is to use UPDATE statements instead of importing the table.

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums