M
Marat
I need to call the same function from every section of the report. In the
function I am traversing the fields that are about to print. I coded it like
this:
Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call
DumpPrintingData(Me.Section("PageHeaderSection"))
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call DumpPrintingData(Me.Section("Detail"))
End Sub
All works fine when the argument explicitly sends the section that is about
to print: Me.Section("Detail") or Me.Section("PageHeaderSection")
I want to reference the section so that I could make the call from all
section with the same code like this:
Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call CountSectionControls(CurrentSection)
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call CountSectionControls(CurrentSection)
End Sub
Of course there is no such thing as "CurrentSection".
What is the the appropriate argument I could send to the function so I could
determine which particular section is printing?
TIA!
Marat.
function I am traversing the fields that are about to print. I coded it like
this:
Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call
DumpPrintingData(Me.Section("PageHeaderSection"))
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call DumpPrintingData(Me.Section("Detail"))
End Sub
All works fine when the argument explicitly sends the section that is about
to print: Me.Section("Detail") or Me.Section("PageHeaderSection")
I want to reference the section so that I could make the call from all
section with the same code like this:
Private Sub PageHeaderSection_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call CountSectionControls(CurrentSection)
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then Call CountSectionControls(CurrentSection)
End Sub
Of course there is no such thing as "CurrentSection".
What is the the appropriate argument I could send to the function so I could
determine which particular section is printing?
TIA!
Marat.