If I call a procedure in another database the code in that database will run, I'll call it the "Remote" database. An instruction such as "docmd.OpenQuery" in the remote procedure will run a query in the remote database. OK, but what doesn't work is a TransferText instruction such as:
DoCmd.TransferText _ acImportDelim, "Data", "tblData", "D:\Data\VAS\VASFull.csv", True
Annoyingly the data will be transferred to the database that was the original calling database that made the call to the remote database. eg
DB A calls procedure in DB X, above code in DB X imports data to tblData in DB A and not DB X which is where I want it!
Other instructions run in the remote database against objects in the remote database. Why not TransferText?
Solution Please!
DoCmd.TransferText _ acImportDelim, "Data", "tblData", "D:\Data\VAS\VASFull.csv", True
Annoyingly the data will be transferred to the database that was the original calling database that made the call to the remote database. eg
DB A calls procedure in DB X, above code in DB X imports data to tblData in DB A and not DB X which is where I want it!
Other instructions run in the remote database against objects in the remote database. Why not TransferText?
Solution Please!