transfer data between tables

Alkaline

Registered User.
Local time
Today, 13:07
Joined
Sep 15, 2007
Messages
18
I have imported a table from another database, and so I need to transfer data from the imported one, to another table in the database; only certain fields though. I have created the fields I want to copy the data into, in the second table. So I just need to go through all the rows in the second table, find the row in the imported table by ID, and take the data I want from it using VBA.

Does anyone have any idea what the code would look like?
 
I have imported a table from another database, and so I need to transfer data from the imported one, to another table in the database; only certain fields though. I have created the fields I want to copy the data into, in the second table. So I just need to go through all the rows in the second table, find the row in the imported table by ID, and take the data I want from it using VBA.

Does anyone have any idea what the code would look like?

You will need an update query.
Your query will involve Imported table and Second Table.

Your update query will have a syntax along these lines - but this is NOT the SQL :
Update Second Table, ImportedTable
set flda in SecondTable to fldx in ImportedTable
,fldb in SecondTable to fldy in Importedtable
where the Id in SecondTable = Id in ImportedTable
.

There are samples in Access Help and on the net.

Here are some links:

http://www.databasedev.co.uk/update_query.html

http://www.techonthenet.com/access/queries/update2.php
 

Users who are viewing this thread

Back
Top Bottom