Export table from one database to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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.
 
Back
Top