I have the following code that returns a report for me:
CODE
DoCmd.OpenReport "rptExercise", acViewPreview, , , acHidden, 6
DoCmd.OutputTo acOutputReport, "rptExercise", acFormatPDF, "C:\Documents and Settings\" & UserText & "\Desktop"
DoCmd.OutputTo acOutputReport, "rptExercise", acFormatPDF, "C:\Documents and Settings\" & UserText & "\Desktop"
I am going about it this way since you cannot use an OpenArg in an OutputTo Cmd. The report will generate and stay hidden. Then I get a popup that shows it is "Printing" the report, or sending it to PDF. However, after that popup the operation stops with "The OutputTo action was cancelled".
Any idea what I am doing wrong. The Report opens the a record count I have based on the argument I pass.
Thank You.