Design by Sue
Registered User.
- Local time
- Yesterday, 18:43
- Joined
- Jul 16, 2010
- Messages
- 816
I have been searching for a solution to add a command button to a report that will export the report (or underlying query which ever is better) to an excel file. I have found the following which is supposed to save the file with the date added to the name. I get the message box that the file is being outputted but I get a runtime error 2302 "Can't save the output data to the file you've selected. " I am sure the part c:\Desktop\TimeComplete is my error. I would like this to save the file to the desktop of the user. What would be the correct info for this>
DoCmd.OutputTo acOutputReport, "TimeCompletedRPT", acFormatXLS, "c:\Desktop\TimeComplete - " & Format(Date, "ddmmyyyy") & ".xls"
Thanks
Sue
DoCmd.OutputTo acOutputReport, "TimeCompletedRPT", acFormatXLS, "c:\Desktop\TimeComplete - " & Format(Date, "ddmmyyyy") & ".xls"
Thanks
Sue