
Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Thanks, but that path lead to a horror show in Preview mode.
Here's what I eventually came up with - and it seems to work. If anyone can
punch holes in it, please post a note.
In the Format event of the Page Footer section
intP = Me!txtPage
intS = Me!txtPages
If FormatCount >= 1 Then
intT = intP+intS
Select Case intT
Case 4
' print signatures
' hide city
Case 3
' hide signatures
' print city
Case Else
' print signatures
' print city
End Select
End if
Larry
> Try the Report header and footer (as opposed to the Page header or footer)
>
[quoted text clipped - 19 lines]
>>
>> Larry
Ken Sheridan - 25 Feb 2007 19:09 GMT
Larry:
You are testing for the FormatCount property being >= 1, which will always
evaluate to True. I suspect you might be misunderstanding the way the
FormatCount property works. It returns the number of times the section's
OnFormat event property has been evaluated for the current section. It is
reset to 1 when the next section is formatted. The number of iterations
through the report, which might be what you have in mind here, is not
relevant. To determine that you can set a value of a module level variable
in the report footer's Format event procedure so that the variable only has
that value on the second iteration through the report.
In your case as you are assigning values to the two variables locally in the
event procedure it looks to me like you can forget about the FormatCount
property completely as the values are not going to change however many times
the section is formatted.
Going back to your original post:
If Pages = 1 Then
' one page report so
' show both signature and city
Else
' multi page report so
If Page = 1 Then
' first page so show the city and hide the signature
Else
If Page = Pages
' last page so show signature and hide city
Else
' intervening pages
' what do you do here? Hide both?
End If
End If
Ken Sheridan
Stafford, England
> Thanks, but that path lead to a horror show in Preview mode.
>
[quoted text clipped - 45 lines]
> >>
> >> Larry
Larry Kahm - 26 Feb 2007 00:16 GMT
Ken,
I am going to try that suggestion later tonight. If it works - as I suspect
it will - then I'll clean up the code.
Thanks!
Larry
> Larry:
>
[quoted text clipped - 94 lines]
>> >>
>> >> Larry