I do the DoCmd.OpenReport with acPreview and my filter condition, and then, on the next line do the DoCmd.OutputTo with the same report name and acFormatRTF or acFormatXLS and it uses the filter condition from the .OpenReport method. However, the user also gets a print preview along with the RTF or Excel output. No one has complained yet. I haven't tried to find a way around that.
>Thank you very much, Bret. This is almost exactly what I needed.
>
>There is however one problem: How do I incorporate the WHERE condition to the report in this command? I can't see it from the command template:
>
>Report Template:
>
>DoCmd.OpenReport reportname[, view][, filtername][, wherecondition]
>
>OutputTo Template:
>
>DoCmd.OutputTo objecttype[, objectname][, outputformat][, outputfile][, autostart][, templatefile]
>
>Thanks in advance
>Charles Richard
>
>>>Can anyone tell me how to programatically create a HTML report from an Access report? (I.E. Save as HTML does it through a wizard manually. I want to automate this)
>>>
>>>Thanks in advance
>>>Charles
>>
>>DoCmd.OutputTo with the acFormatHTML parameter.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only