Conditional footer

LaurieW

Registered User.
Local time
Today, 13:57
Joined
May 9, 2002
Messages
99
I have a report that consists of a letter on page 1 and a certificate on page 2. This report runs many of these page 1/2 combinations at a time.

I want to put my agency address in the page footer and have it only appear on the letter (page 1) and not the certificate (page 2). The agency address is on two lines of text.

Is there a way in VBA to say to print the page footer only on the odd pages of the report, which would be all page ones? Or some other way to tell it to print only on the letter and not the certificate pages?

I have two unbound text boxes in the page footer, with this code in the PageFooterSection "on Format" event:

If Page = 1 Then
[txtFooter1] = "Address line 1 goes here"
[txtFooter2] = "Address line 2 goes here"
Else
[txtFooter1] = ""
[txtFooter2] = ""
End If

What do I need to say instead of "Page = 1" ?

Thanks...hope someone can help.

Laurie
 
Answer for Conditional Footer

I found the answer to fix my conditional footer problem. I'm posting it here in case someone else needs to use it ... I found a related topic in one of Helen Feddema's Woody's Access Watch columns. ...Laurie

intPageNo = Me.Page
If intPageNo Mod 2 = 0 Then
[txtFooter1] = ""
[txtFooter2] = ""
Else
[txtFooter1] = "Address line 1"
[txtFooter2] = "Address line 2"
End If
 

Users who are viewing this thread

Back
Top Bottom