Re: Help on subreport
- From: "JACK GUNAWAN via AccessMonster.com" <u18520@uwe>
- Date: Fri, 17 Feb 2006 00:09:12 GMT
Al Camp wrote:
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.
I can not figure out how to know the number of times the report has been[quoted text clipped - 6 lines]
printed whenever somebody print the same report.
Jack
Thanks for the assistance, Al Camp. However, I do not know how to use the
programing code. How to open the program code and do I just copy and paste
the code that you gave me. Thanks.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200602/1
.
- Follow-Ups:
- Re: Help on subreport
- From: Al Camp
- Re: Help on subreport
- References:
- Help on subreport
- From: JACK GUNAWAN via AccessMonster.com
- Re: Help on subreport
- From: Al Camp
- Help on subreport
- Prev by Date: Re: Access 2003 running very slowly in Report design view, help!
- Next by Date: Re: Sizing an image control
- Previous by thread: Re: Help on subreport
- Next by thread: Re: Help on subreport
- Index(es):
Relevant Pages
|