Hi.
I have a db with a report that contains a number of labels. On the onload event of the report the label caption is updated:
There are two ways that I use this db. The first one is by opening a form and going from there; this report is then accessed through a button on the main form. The second is by using a Windows scheduled task with a macro which calls a function to simply output this report to a folder
Both of these methods work fine to create the report and show the correct data (from a query), however when using the second method (the autoexec) the label captions do not get updated as they do when opening the report through a form in the database. It is as if the labes "did not have time" to update at all. The end result is that when the report is opened through a database form, the label caption is "Friday, April 21st" (correct), however when using the macro and saving the report, the caption is "Today"(incorrect, not updated). Why?
mafhobb
I have a db with a report that contains a number of labels. On the onload event of the report the label caption is updated:
Code:
Me.lblToday.Caption = WeekdayName((Weekday(Date, 2))) & ", " & Date
There are two ways that I use this db. The first one is by opening a form and going from there; this report is then accessed through a button on the main form. The second is by using a Windows scheduled task with a macro which calls a function to simply output this report to a folder
Code:
Public Function SendRPTTodayReport()
DoCmd.OutputTo acOutputReport, "rptTodayReport", acFormatPDF, "\\Servidordatos\IFly\DB Public Data\Today Report\Today" & ".pdf", False, "", 0, acExportQualityPrint
Application.Quit
End Function
mafhobb
Last edited: