Using OutputTo with a report that has OpenArgs

  • Thread starter Thread starter ExcelMan
  • Start date Start date
E

ExcelMan

I have a report that I want to output to a Word file. I have most of
the code working fine with a small exception. I want to pass a
parameter into the report, preferably using the OpenArgs argument. But
i don't know the syntax for launching a report with OpenArgs when I am
using the DoCmd.OutputTo command to run the report and save it as a
Word (.doc) file.

Does anyone know how to do this? Or any other approach that
accomplishes the objective.

Thanks.
 
Open the form in preview mode before using OutPutTo.
(use Echo to turn off screen updates if you really don't
want to see the preview).

Or replace the OpenArgs with a value in a table, and use
the value from the table instead of OpenArgs

Or use a global variable (for example, a database property,
or a value on a form), instead of OpenArgs.

(david)
 
Back
Top