Run External DB from Currentdb

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
 

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