insert picture based on field value

K

klkropf

I am trying to insert a picture in a report, but only if the value of a
specific field is correct. This is what I currently have.

If Len(Me.ImageGlobePath & "") > 0 And Me.Global_US = "G" Then
Me.GlobeImage.Picture = Me.ImageGlobePath
Else
Me.GlobeImage.Picture = "C:\Pictures\blank.bmp"
End If

But when this runs as soon as it come across an employee with Global_US
equal to "G" then it inserts the picture for every record after that even if
it isn't equal to "G".
 
E

Evi

It ought to work, so long as you have the correct file path, file name and
file extension of Blank.bmp.
Have you got this code in the On Format event of the section that contains
the Image frame?

Evi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top