Import Query as a Table using Macro or DoCmd

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?
 
C

Chris Nebinger

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
 

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