Print to Printer dispays value not on print preview of report



Hello all,

I have a report that looks back at the previous 20 years of data and prints
the values and the % change from the previous year. All the data, including
the % change are contained in a table (not my doing). I have written some
code (see below) to not display the percent change of the first year reported.
The reports previews fine but when I print the value for % change for the
first record actually prints.

More Detail: I have a field TOTCHG that has the percent change stored in it.
I created a text box to display the value contained in TOTCHG except for the
first record. The code to do this is below.

Option Compare Database
Option Explicit

Dim counter As Integer

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If counter = 0 Then
Me.Text21 = ""
Else
Me.Text21 = Me.TOTCHG
End If
counter = counter + 1
End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

End Sub

Any ideas that anybody may have would be greatly aprpeciated.

Aaron

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200701/1

.



Relevant Pages

  • Hide Detail
    ... My report shows many records for each group but I would only like to see the ... first record per group. ... Private Sub Detail_Print ... Can someone (wiser than I) please correct this for me? ...
    (microsoft.public.access.reports)
  • Re: Hide Detail
    ... >first record per group. ... >OnPrint event of the detail section I have tried to specify that the detail ... >Private Sub Detail_Print ... Note that it would be more in line with report processing ...
    (microsoft.public.access.reports)
  • Re: Hide Detail
    ... >first record per group. ... >OnPrint event of the detail section I have tried to specify that the detail ... >Private Sub Detail_Print ... Note that it would be more in line with report processing ...
    (microsoft.public.access.reports)
  • Re: Error: Microsoft jet database engine does not recognize " as a va
    ... If you are attempting to create a crosstab report with dynamic columns, ... > Dim rstReport As DAO.Recordset ... > Dim intX As Integer ... > Private Sub Detail_Format ...
    (microsoft.public.access.reports)
  • Re: Error: Microsoft jet database engine does not recognize " as
    ... Report Propoerties window or would it need to be done through the VB code? ... >> ' Variables for Database object and Recordset. ... >> Dim rstReport As DAO.Recordset ... >> Private Sub Detail_Format ...
    (microsoft.public.access.reports)