Create a Report with Grouping Levels & Export to Excel

noboffinme

Registered User.
Local time
Today, 14:00
Joined
Nov 28, 2007
Messages
288
Hi

I want to produce a report that can group up to 3 levels of data in a report - same as Access allows in the Report Wizard & then export it as an Excel file.

I can only do this manually at the moment by creating the grouped report using the Wizard, on 3 parameters, going to design view & exporting it as an Excel file.

It ends up as an Excel file with grouping attached.

I can't obtain any code to use to write a procedure to do this in one go as it's done automatically by the Wizard.

Thought that maybe someone has already done this, an example file with the desired format I would like to see as a result is attached, Thanks
 

Attachments

In case anyone needs this, here's the code syntax,

Private Sub send_to_excel_Click()
DoCmd.OutputTo acOutputReport, "Report_Name", acFormatXLS, "C:\Documents and Settings\rest of path to Excel file you want the report sent to.xls", True
End Sub
 

Users who are viewing this thread

Back
Top Bottom