OutputTo and Destination path 
Author Message
 OutputTo and Destination path

I have the following problem.
I have a series of queries that I run each month and I want to Output
ther results of the queries into different folders each month (ie
October98; November98 etc...).
I created a dialog form in which I select the parameters (month and
year) for the queries. How do I now tell Access that it has to store the
output Excel files into the correct folder for that month?
I have tried to play around with the expression below but couldnt find
the correct way to do it.
Does anybody can help??
Thanks
enrico

DoCmd.OutputTo acOutputQuery, "Queryname", acFormatXLS,
"c:\october98\filename.xls"



Tue, 31 Jul 2001 03:00:00 GMT  
 OutputTo and Destination path
Use

DoCmd.TransferSpreadsheet instead of OutputTo

Also you may want to look at the add-in below...

--
************************************************
Manish Jha

 Data Flow Manager
Data Migration add-in for MS Access
http://pages.prodigy.net/manishj/psdfm.htm
************************************************

Quote:

> I have the following problem.
> I have a series of queries that I run each month and I want to Output
> ther results of the queries into different folders each month (ie
> October98; November98 etc...).
> I created a dialog form in which I select the parameters (month and
> year) for the queries. How do I now tell Access that it has to store the
> output Excel files into the correct folder for that month?
> I have tried to play around with the expression below but couldnt find
> the correct way to do it.
> Does anybody can help??
> Thanks
> enrico

> DoCmd.OutputTo acOutputQuery, "Queryname", acFormatXLS,
> "c:\october98\filename.xls"



Tue, 31 Jul 2001 03:00:00 GMT  
 OutputTo and Destination path
Have you tried something like this:

    dim strFolderName as String

    strFolderName = me.txtFolderName

    DoCmd.OutputTo acOutPutQuery, "Queryname",acFormatXLS, _
    "c:\" & strFolderName & "\filename.xls"

    Where me.txtFolderName is a Text box on your form.

Quote:

>I created a dialog form in which I select the parameters (month and
>year) for the queries. How do I now tell Access that it has to store the
>output Excel files into the correct folder for that month?
>I have tried to play around with the expression below but couldnt find
>the correct way to do it.

>DoCmd.OutputTo acOutputQuery, "Queryname", acFormatXLS,
>"c:\october98\filename.xls"



Fri, 03 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SQL - Join one table in one destination to another table in another destination (DBF)

2. This array is fixed or temporarily locked Error with DoCmd.OutputTo

3. OutputTo RTF 88% smaller than regular label report

4. Help with OutputTo SendTo Action/Method - Multi-post

5. outputto

6. OutputTo Error command or action not available.

7. OutputTo acOutputReport giving error 29013

8. outputTo with variable outpput name

9. DoCmd.OutputTo just stops in Access 2000

10. DoCmd.OutputTo snapshot causes processing to stop

11. Need faster than: DoCmd.OutputTo

12. Docmd.OutputTo

 

 
Powered by phpBB® Forum Software