TransferDatabase Method

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

Hello,
I am using the following code to import a table from an
ODBC datasource and is working fine:

DoCmd.TransferDatabase acImport, "ODBC
Database", "ODBC;DSN=MYODBCCon;", acTable, strTableName,
strTableName, 0, 1

Now, I do not want to bring this table into my current
database, but have the destination be an external
database. I have tried using the full path in
the 'destination' part of the method, but it still imports
into my current db. I cannot use this method in the new
destination because I am going to 'Create' the .mdb,
import the tables, then 'Kill' the .mdb when finished with
the data.

Any help with this Method syntax to accomplish this would
be appreciated.

Regards,
Terry
 
You can't do it that way. Instead, just use a SQL
query to do it:

db1.execute "select * into [db2].[t2] from [db3].[t3];"

(david)
 

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

Back
Top