View Full Version : Extracting Reports To Excel


Stargater
09-17-2007, 03:27 AM
Hi Forum,

I am currently trying to extract a number of reports from access to excel.
The Idea is that excel formulas (Lookups etc) can be applied to pick of the data for another report.
Currently i am using a DoCmd as per below.

DoCmd.OutputTo acOutputReport, "mi - Weekly - Error Type (Escalations)", acFormatXLS, , True

However when you open this report it prompts you enter a start and end date to be applied to the data within the report. Can anyone help me modify the code to automaticaly input the two dates (start/end) for me? Or am i going about this the completly wrong way?

Any help would be much appriciated.

thanks

Guus2005
09-18-2007, 01:34 AM
Your report was run based on a query. The query requires two dates. You have to make a new query where these dates are already filled in and then run the report based on this query, or you can use a form where you can store the dates on, create a query which retrieves the dates from this form and run the report based on this query.

Enjoy!

Stargater
09-19-2007, 01:22 AM
Thank you very much i have got it to work perfectly.

Many thanks