I need help. I'm importing undated tables into my database and need to be able to link them up to existing tables. The existing tables have a related field that can be linked to the imported tables. help.
Here's what i'm trying to do. I have a database that is a stand alone DB. I'm importing the some tables from another database with updated information. Here's where the link tables comes into play. I have tables that i've created that do not get deleted and replaced from the imported tables. I do however need to restablish the link between the new imported tables and the existing tables.
P.S The reason i do not just link to the tables instead of importing them is because the database is sometimes taken off the LAN.
So you want to update the data with the data you just imported?
Assuming you have a Prime key, should not be a problem
Make yourself three queries, joining on the Prime key
First one set the properties of the join to show only all records in the new table regardless of the old table, and set a criteria of null on the PK of the old table. This identifies all rows added to the table, make this an append query
and so on make an update and a delete query with the otehr two
But why are you not using replication? Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
Sorry, I was jumping ahead, assumed you new how to link tables.
You can link the tables usinf File \ Get External Data \ Link.
The fact that the tables are not always available does not matter, just trap and errors which occur as a result of attempting the access them whilst they are not available.
You may wish to be able to link or re-link using VBA code, this is quite possible and there are lost of bits of code about to show you how to do this (see faq700-1584, nothing to do with me, I just found it using a quick search of FAQ on this site).
You cannot make relationships in the relationships window on linked tables, but you can include them in queries as I explained in earlier post.
You still have not said if you have looked at replication, it is intended to syncronise databases in the way you are trying to do. Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
The database is a self contained database. The relationships between the tables needs to be built after they are imported. The database has no links therefore replication is out.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.