Problems creating a report with photos.

K

Kelvin Beaton

I'm trying to create a report that includes photos.



The "Fields Type" is set to "OLE Object". My report runs off a query. I have
the query returning only records that have a path to a JPG file listed.
There are 189 JPGs and there are 189 records that have paths to those files.



My report has this code.

----------

Function setImagePath()

Dim strImagePath As String

On Error GoTo PictureNotAvailable

strImagePath = Me.txtImageName

Me.ImageFrame.Picture = strImagePath

Exit Function



PictureNotAvailable:

strImagePath = "C:\MCC\NoPhoto.gif"

Me.ImageFrame.Picture = strImagePath



End Function

----------



When I run the query all the records have a path to a valid image file.

The problem I'm having is when I run the report, not all the records display
their picture. Some display nothing and some display the "NoPhoto.gif".



Can someone help me figure this out?



I'm using Access 2003.



Thanks



Kelvin
 

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