G
Guest
I have report that I need to have the number of pages counted and then the
number placed in a text box on a form. I am able to do this using the below
code in the report. The problem is first the report has be previewed or
printed before it performs this operation.
Can I get the number of pages of the report without having to print or
preview it and the user seeing this happen? i.e. It does not matter if the
report is opened or previewed as long as the user does not see this. Thanks
for any help. My code is below:
Private Sub Report_Page()
Dim intPage As Integer
intPage = Me.Pages
Forms![FaxEmployment2]![txtComputerPrintouts] = intPage - 1
End Sub
number placed in a text box on a form. I am able to do this using the below
code in the report. The problem is first the report has be previewed or
printed before it performs this operation.
Can I get the number of pages of the report without having to print or
preview it and the user seeing this happen? i.e. It does not matter if the
report is opened or previewed as long as the user does not see this. Thanks
for any help. My code is below:
Private Sub Report_Page()
Dim intPage As Integer
intPage = Me.Pages
Forms![FaxEmployment2]![txtComputerPrintouts] = intPage - 1
End Sub