I use the following code in many place to open and print a log. I would like to let the User preview the report, then decide if they want to print the log, which seems easy, but the Preview view that shows always show a blank "LogText" control.
Is there a way to make the report show the changed text?
Code:
If bolErrorsFound Then
strReport = "rptProcessingLog"
DoCmd.OpenReport strReport, acViewPreview, , , acHidden
Report_rptProcessingLog.Title = "MyTitle : " & strCustom
' LogText is a public property of the report
Report_rptProcessingLog.LogText = strLog
DoCmd.SelectObject acReport, strReport
DoCmd.PrintOut acPrintAll
End If