Hello
I am using Access 2002. I have hidden the main DB window as part of the AutoExec startup code.
I have some code to send data from a query to an Excel file using:
DoCmd.OutputTo acQuery, stDocName, acFormatXLS
I check the query first for records - if there are none the application returns to the menu.
When I run this "report" with the main DB window open (not hidden) it works fine and displays the OutputTo / file selector window as expected.
When I run this report with the main DB window hidden, I get the error:
"2046: The command or action 'OutputTo' isn't available now."
Any clues?
Cheers, Ben
I am using Access 2002. I have hidden the main DB window as part of the AutoExec startup code.
I have some code to send data from a query to an Excel file using:
DoCmd.OutputTo acQuery, stDocName, acFormatXLS
I check the query first for records - if there are none the application returns to the menu.
When I run this "report" with the main DB window open (not hidden) it works fine and displays the OutputTo / file selector window as expected.
When I run this report with the main DB window hidden, I get the error:
"2046: The command or action 'OutputTo' isn't available now."
Any clues?
Cheers, Ben