Need help with a report

  • Thread starter Thread starter ladivapr
  • Start date Start date
L

ladivapr

Hello guys, I have a question regarding access reports..

Okay I have various reports witht he following problem. My client want
the reports in way that it shows in the header when its a continuatio
of the information of the before page. Like if a paper is found you ca
be able to tell there is more information and whatnot. Okay like this:

Page 1

dog bone
bone
bone

Page 2

bone
bone
bone

Now I would like Page 2 to look like this

Page 2

dog (continued)
bone
bone
bone

Is there a way I can do this? Like a macro or something? My client jus
want it this way. Please help me out
 
Here is one approach

' Module level variable declaration '(overkill as is: could be a static
procedure-level declaration instead)
Private mstrHeaderValue As String

Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
' NOTE: This is the PRINT event for this Section, not the FORMAT event

' This is the Header for a Grouping on a Field called ScenarioID
' The RepeatHeader property of the section is set to true
' There is a label in the section called lblContinued with:
' - caption property = (Continued) + whatever formating desired
' - visible property = False (this should be unnecessary)

' Reveal or hide "continued" label
If mstrHeaderValue = Me.ScenarioID Then
' This is a continuation
Me.lblContinued.Visible = True
Else
' This is a new grouping
Me.lblContinued.Visible = False
mstrHeaderValue = Me.ScenarioID
End If
End Sub

Hope this helps,
 
Back
Top