Re: Help on subreport



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
printed whenever somebody print the same report.
[quoted text clipped - 6 lines]

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
.



Relevant Pages

  • Re: NS deaths: Are you parents dead too?
    ... My heart goes out to the parents of Too Hui Min from Selangor. ... I wish to do a content analysis of two news report today, ... The Star also made another report on a camp ... The Berita Harian ...
    (soc.culture.malaysia)
  • Re: OT: Now They Try And Make Excuses...
    ... President Bush was unaware of the pending sale of shipping operations at six major U.S. seaports to a state-owned business in the United Arab Emirates until the deal already had been approved by his administration, ... The United States raised concerns with the United Arab Emirates seven years ago about possible ties between officials in that country and Osama bin Laden, according to a section of the Sept. 11 commission's report that details a possible missed opportunity to kill the al-Qaida leader. ... The report states U.S. intelligence believed that bin Laden was visiting an area in the Afghan desert in February 1999 near a hunting camp used by UAE officials, and that the U.S. military planned a missile strike. ...
    (alt.guitar.amps)
  • NS deaths: Are you parents dead too?
    ... NS deaths: ... My heart goes out to the parents of Too Hui Min from Selangor. ... I wish to do a content analysis of two news report today, ... The Star also made another report on a camp ...
    (soc.culture.malaysia)
  • Re: Cmd button to print report.
    ... "Al Camp" wrote: ... > I was referring to the VB code behind an Event Procedure. ... > report macro, since I don't see a Refresh available as a command. ... > Private Sub cmdPrintReport_Click ...
    (microsoft.public.access.forms)
  • Re: A new take on "allegedly"
    ... the journalist rather be protecting herself from the allegations ... A black boy was beaten by guards in a "boot camp" and ... The Coroner's report says that he died of sickle cell ... considered part of a cover-up for the state-run camp. ...
    (alt.usage.english)