Report Background (1 Viewer)

AntB

New member
Local time
Today, 00:37
Joined
Dec 14, 2011
Messages
2
I can change a picture on a report to show a different picture for every page. How can I do this to show a different back-ground on pages
 

AntB

New member
Local time
Today, 00:37
Joined
Dec 14, 2011
Messages
2
How are you doing it at the moment?

I Have tried it the same way as inserting a picture - Creating a relationship between two tables and linking the pictue
 

vbaInet

AWF VIP
Local time
Today, 08:37
Joined
Jan 22, 2010
Messages
26,374
Are the images saved on hard disk?

This is the sort of thing you do:
Code:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If FormatCount = 1 Then
        If Me.Page Mod 2 = 1 Then
            Me.Picture = "C:\Path\To\Image\FirstImage.bmp"
        Else
            Me.Picture = "C:\Path\To\Image\SecondImage.bmp"
        End If
    End If
End Sub
So that example shows FirstImage.bmp if the page is an odd number and SecondImage.bmp for even page numbers. Note that it uses the Format event of the Page Header section.

You can use a SELECT CASE statement if you want to apply different criteria, but you get the gist of it.
 

Users who are viewing this thread

Top Bottom