Report Background (1 Viewer)

bleakcabal

Registered User.
Local time
Today, 08:29
Joined
Mar 19, 2002
Messages
12
What is the easiest way to set a background for a report via programmation ?

I don't want to set it manually when I create the report because I want to user to select the background he wants in a form.

I have tried playing with the picture property by doing :
Code:
Me.Picture = "C:\Images\back1.jpg"

Or

Code:
Report_rptLitt1.Picture = " C:\Images\back1.jpg"

But I am not getting any results with both of these commands.
 

boblarson

Smeghead
Local time
Today, 00:29
Joined
Jan 12, 2001
Messages
32,059
I tried this and it seemed to work fine:

Private Sub Report_Open(Cancel As Integer)
Dim strPicName As String
strPicName = InputBox("Enter File Name", "Picture to use")
Me.Picture = strPicName
Me.PictureSizeMode = 1
End Sub

The size mode will set it to either Clip, Stretch, or Zoom (look in the helpfile for the values).

BL
hth
 

Users who are viewing this thread

Top Bottom