under ReportHeader OnPrint =SetCount([Reports]!
[rptProjectEEClassAndCerts])
Function SetCount(R As Report)
TotCount = 0
End Function
Under Detail OnPrint [Event Procedure]
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
PrintLines(reports!rptProjectDailySignIn, totgrp, reports!
rptProjectDailySignIn!name) 'I get the error while typing this line
End Sub
Oops....Heres the rest of the code
Public Sub PrintLines(R As Report, totgrp, f1 As Control )
TotCount = TotCount + 1
If TotCount = totgrp Then
R.NextRecord = False
ElseIf TotCount > totgrp And TotCount < 30 Then
R.NextRecord = False
f1.Visible = False
End If
End Sub
Any help is appreciated.
Maybe use Call if it is working. As in
Call PrintToDebugWindow("Hello World")
or without "call" and no paranthesis
PrintToDebugWindow "Hello World"
Check help on Call.
I changed to the following:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Call PrintLines(reports!rptProjectDailySignIn, totgrp, reports!
rptProjectDailySignIn!name)
End Sub
The event will allow it without errors when I type it but I get this
error when I preview the report:
The express you entered has a function name that Microsoft Office
Access can't find.
Any other thoughts?
Put the word
STOP
right abouve the Call line. Then step thru the code and see what the
parameters are that you are passing. Maybe passing Name, a reserved
word, upsets the code.
I rewrote the subroutine under a new name and it is now working.
Thanks for the assistance