Auto Export Report to Excel- DoCmd.OutputTo

tafnuef1

Registered User.
Local time
Today, 10:07
Joined
Apr 22, 2010
Messages
43
Ok, I have a report.. I gave up trying to bring Counts from the Subreport to Sum on the Main Report. Seems many folks are having issues doing that. SO what I have decided to do is when I run my Access report it will automatically open up as a Excel worksheet. OK That part.. I got.. by Opening the report and in the Report Properties I went in under Events and chose "ON Activate" I put this method in:

Private Sub Report_Activate()
DoCmd.OutputTo acOutputReport, "Prepper Audit Report", _
acFormatXLS, "Prepper Audit Report.XLS", True
End Sub

Ok that brings up my report just fine.. Now can someone tell me how I can tell it to sum certain columns when it opens as well? How would I type it in the above Method? Trying to make this report as maintenance free as possible. HELPPPPPPP:confused:
 
ALSO.. if I can sum a few columns.. How would I tell it to Page Break on a change in a certain field? If this is possible?
 

Users who are viewing this thread

Back
Top Bottom