A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Import Database from Mult-Tables



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2008, 05:00 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 96
Default Import Database from Mult-Tables

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
  #2  
Old May 4th, 2008, 08:53 PM posted to microsoft.public.access.forms
Damon Heron[_2_]
external usenet poster
 
Posts: 237
Default Import Database from Mult-Tables

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

wrote in message
...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.