J
JACK GUNAWAN via AccessMonster.com
HI, AL, sorry for the very late reply, I have tried : But to no avail. The
event does not work maybe there is some mistake with the event code?
In addition, I am trying to use this to count the number of time report being
printed for the same report (according to sales order) and every report has
different number of times being printed. Can i also use the number of times
being printed to display on the report as to how many times being printed.
Thanks so much for the kind assistance. desperate.
Jack
I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
In addition, how do I get the subreport on a report to display the same
product list (both in the subreport and report) while the list extends to 5
pages. Whenever I get to second page, the subreport still displays the first
page product list. Thanks. Please Help.
Jack
Reply to this message
Al Camp - 02-13-2006 18:08
Jack,
Not sure about "elegance" but this works...
Let's say you have a report called rptTest.
Create a table called PrintCount with 2 fields, ReportName/Text/NopDupes
and PrintCount/Num/Integer
Populate the table with this data...
ReportName PrintCount
rptTest 0
Use the report Open event to run this code...
Private Sub Report_Open(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblPrintCount SET tblPrintCount.PrintCount =
NZ([PrintCount])+1 " & _
"WHERE (((tblPrintCount.ReportName)='rptTest'));"
DoCmd.SetWarnings True
End Sub
Be aware, that PrintPreview also constitutes a "print" and increments
the counter. If you have the report "hardwired" to always print directly to
a printer (with no PrintPreview), then this should work pretty well.
Reply to this messageMessage Tree
JACK GUNAWAN - 03-15-2006 10:20
event does not work maybe there is some mistake with the event code?
In addition, I am trying to use this to count the number of time report being
printed for the same report (according to sales order) and every report has
different number of times being printed. Can i also use the number of times
being printed to display on the report as to how many times being printed.
Thanks so much for the kind assistance. desperate.
Jack
I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
In addition, how do I get the subreport on a report to display the same
product list (both in the subreport and report) while the list extends to 5
pages. Whenever I get to second page, the subreport still displays the first
page product list. Thanks. Please Help.
Jack
Reply to this message
Al Camp - 02-13-2006 18:08
Jack,
Not sure about "elegance" but this works...
Let's say you have a report called rptTest.
Create a table called PrintCount with 2 fields, ReportName/Text/NopDupes
and PrintCount/Num/Integer
Populate the table with this data...
ReportName PrintCount
rptTest 0
Use the report Open event to run this code...
Private Sub Report_Open(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblPrintCount SET tblPrintCount.PrintCount =
NZ([PrintCount])+1 " & _
"WHERE (((tblPrintCount.ReportName)='rptTest'));"
DoCmd.SetWarnings True
End Sub
Be aware, that PrintPreview also constitutes a "print" and increments
the counter. If you have the report "hardwired" to always print directly to
a printer (with no PrintPreview), then this should work pretty well.
Reply to this messageMessage Tree
JACK GUNAWAN - 03-15-2006 10:20