Import Query as a Table using Macro or DoCmd

  • Thread starter Thread starter Dkline
  • Start date Start date
D

Dkline

I have two databases.

The Source database has all the tables and queries.

The Target database has all the forms and tables. The tables are imported
from the Source Database based on the queries.

What I need to do is to automate the task of importing the queries of the
Source as tables in the Target. These would not be appends but replacements.

I've been looking at DoCmd.TransferDatabase Method as the choice.

What is the difference or advantage ( if any) between running
TransferDatabase as a Macro or in VBA?
 
You can also have queries in the target see the data from
the Source:


Select * from msysobjects in 'C:\Documents and
Settings\USER\My Documents\db1.mdb'


Now, you can write delete queries to delete existing data
in your tables, then append queries.

Or, just use your queries as the datasource.



Chris Nebinger
 
Back
Top