Export to excel (1 Viewer)

krc547

Member
Local time
Today, 16:28
Joined
Sep 1, 2023
Messages
38
I have a button on my report and have this as the code:

DoCmd.OutputTo acOutputReport, "rFiscal-Month Comparison", acFormatXLSX, "C:\Users\kcummings\Desktop", True

But it just errors out and says it can not export the report.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:28
Joined
Feb 19, 2013
Messages
16,616
Check the parameters- looks like you need to include a file name
 

krc547

Member
Local time
Today, 16:28
Joined
Sep 1, 2023
Messages
38
That was it, I forgot to give it a name. I have a parameter in the report that asks for the fiscal year. But then when I click the button to export the report it asks me the same questions like 5 times before it actually exports the file.
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:28
Joined
Sep 21, 2011
Messages
14,310
Try using the Intellisense ?
 

Users who are viewing this thread

Top Bottom