Import Database from Mult-Tables

L

learning_codes

Hi,

I'm trying to import many tables from many database into one Access
Database to make one table.

Is there a way to import into one table from many tables?

Your help would be much appreciated.


Here is the sample code:

DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\db1.mdb",
acTable, "Table1", "Data", False
DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\db2.mdb",
acTable, "Table1", "Data", False

The result is that I get

Data (would like to have Data1, Data2 adding to DATA table)
Data1
Data2
 
D

Damon Heron

When you import a table with the same name as an existing table, Access adds
a number to the name. If there is no duplicate data in the multiple tables,
you can probably use an append query to add all the data1,data2,etc. tables
to the first table. Note that you can't append the primary key, usually an
autonumber, but you can append all the other fields.

Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top