Export Table to Second DB and Append

jiblankman

Registered User.
Local time
Yesterday, 19:06
Joined
May 27, 2008
Messages
43
I need to export the contents of a table (table1) to another database (table2). I want the contents of the table1 to be appended to the contents of table2.

I would appreciate any help getting this started. I understand the the TransferDatabase command does not allow the data to be appended but will replace the existing table.

Thanks for your help.
 
if it is a once only task, import the table and then use an append query to append the data.
 
Thanks, but it is going to occur on a monthly basis.
 
Never mind, I figured it out. Thank you anyway. In case anyone else is looking, I used the following code in a db1 module:

Code:
Set db = OpenDatabase("db2.mdb")
db.execute "INSERT INTO [table2] SELECT * FROM [db1].[table1]"
Set db = Nothing
 

Users who are viewing this thread

Back
Top Bottom