Using DoCmd.OutputTo from a remote database

  • Thread starter ByronC via AccessMonster.com
  • Start date
B

ByronC via AccessMonster.com

I'm new to sql, so please pardon my ignorance. I am attempting to convert
existing code (shown below) to run in a remote database. How do I tell
Access to run the query "WedgeTbl_Crosstab" in the remote database and output
to Excel? The remote database is a temporary database created on the user's
desktop and the below query is copied in using DoCmd.TransferDatabase.

Existing code:
DoCmd.OutputTo acOutputQuery, "WedgeTbl_Crosstab", acFormatXLS, strFilePath &
strFileName, True

The location of the remote database is located here:
"C:\Documents and Settings\" & CurrentUser & "\desktop\WedgeTemp.mdb"

Thanks....
 
N

NuBie via AccessMonster.com

I'm not sure if you can run a query from another database remotely, (or at
least i haven't done this) a work around would be linking the table, copy the
query into your DB then Docmd.OutputTo ....

Maybe someone has a better idea on this matter.
 
B

ByronC via AccessMonster.com

Thanks for the reply. That's the direction we decided to take.
I'm not sure if you can run a query from another database remotely, (or at
least i haven't done this) a work around would be linking the table, copy the
query into your DB then Docmd.OutputTo ....

Maybe someone has a better idea on this matter.
I'm new to sql, so please pardon my ignorance. I am attempting to convert
existing code (shown below) to run in a remote database. How do I tell
[quoted text clipped - 10 lines]
Thanks....
 

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