programatically change picture dimensions

M

mike

hi. i have a logo that appears at the top of a report. the
logo changes depending what's on the page; each page has a
different region of our company on it. the problem is that
some logos are square and some are rectangular. i have the
logos in a table and was hoping to add a field to the
table that would tell the report what dimensions to make
the logo. i have some code to test changing the dimensions
programatically but it's causing my database (access 2003)
to crash whenever i open the report. any thoughts would be
a big help. thanks very much.

Private Sub ReportHeader_Format(Cancel As Integer,
FormatCount As Integer)

If Me!Logo = "Gateway" Then
Logo.Top = 0
Logo.Left = 0
Logo.Width = 1
Logo.Height = 1
Logo.Stretch = True
Else
Logo.Top = 0
Logo.Left = 0
Logo.Width = 2
Logo.Height = 1
Logo.Stretch = True
End If
End Sub
 
Top