Run External DB from Currentdb

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

Guest

How do I use the transferDatabase action to recognize objects (tables) in an
external Access database?

I can set the workspace, set a database variable = external db, Open the
external dB, loop thru objects in the external db, but the transfer Database
thinks it is still in the currentdb, not the external db.

Here is the setup:
strTempDatabase = "C:\Development\Projects\2. 1rst_New_Pull_New_files\" &
"History_First_" & myYear & "_" & myCount & "_" & "01.mdb"

Set wrkDefault = DBEngine.Workspaces(0)
strPath = "C:\Development\Projects\PSA_Import.mdb"
Set dbPSA = wrkDefault.OpenDatabase(strPath)

DoCmd.TransferDatabase acExport, "Microsoft Access", strTempDatabase,
acTable, "REO", "AllDeals_112904211851", 0

dbPSA.Close

Thanks

Ross
 
Back
Top