output to Excel format in Access 2007



I wrote a program in a previous version of Access in which I would output the
contents of a report to an Excel file for additional use. I am now running
Access 2007 and the same command does not produce the same results. In fact
if I leave out the format the options do not even include the Excel format.
Itried using the 'xlsx' extension but to no avail? The code for what I use
to do follows. Using acFormatTXT works but in not sufficient or efficient.
Do I have to re-write the code to make a table?

Thanks in advance for any help or advie. BTW I am a beginning programmer
so go easy on me. ;-)

DoCmd.OutputTo acSendReport, "Monthly Weather View", acFormatXLS,
"G:\Hardage\O & M Performance Monitoring\Data from Field Office\Rainfall\" &
MMonth & MYear & " Weather Table.xls", False

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