Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Internal Tables

Status
Not open for further replies.

ryan1

Programmer
May 15, 2002
106
US
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.
 
Hi

You need to clarify waht you mean by 'link them up'

Do you mean join in a query

Do you mean append into a single table

Do you perhaps mean a UNION query to give the effect of appending but in a query Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
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.
 
Hi

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
 
Well i will be working in the database so i really need to actually link the tables and create a relationship between the data.
 
Hi

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top