Export table from one database to another

D

Deb

Using Access 2000 - trying to export table from one database to another with
a macro. From: r:\shared\revenue.mdb (table name is revenue) to
c:\company\revenue.mdb

Macro looks like it is working, however after a while task manager shows
program not responding.

Any ideas for this newby??



All help greatly appreciated.
 
T

TPratt

I find it's much easier and faster to do this in a module. Then you can
have a macro to kick it off with "RunCode" in the "Action" column.

Option Compare Database
Option Explicit

Dim strPath As String

Function ExportTables()
strPath = "r:\shared\revenue.mdb"
DoCmd.TransferDatabase acExport, "Microsoft Access", strPath, acTable,
"FromTableName", "ToTableName", False
End Function

If you don't like the "code" option, you could always put the table in the
other database manually, link to it and run an append query.
 
S

Steve Schapel

Deb,

I can only guess that you are using a TransferDatabase macro action for
this... am I right? Are you activating this macro from within the
importing database or the exporting database? Can you give details of
the arguments you are using in your macro? Which event are you using to
trigger this macro? Are there any other actions in your macro as well?
Normally this type of method is reliable, so it is not easy at this
stage to see where the problem might lie.
 

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