Referencing images from text field holding image name.

  • Thread starter Thread starter kmcook
  • Start date Start date
K

kmcook

Can someone please help out a learner here?

A text field in a table contains an image file name, like "10012.bmp" or
"10013.bmp" .... etc...

The image files stand alone in a directory. There are many hundreds to deal
with.

In a report building a catalog, we want to display the matching image every
record, by reading the image filename from the text field, prefixing it
with the directory location, and then delivering the image.

Do not want to have images in the database- too many to handle.

Any help will be appreciated, as detailed as you'd expect a new learner to
need.

TIA

kmc
 
Add an image control to the report; you'll need to embed one image to start
with, but don't worry about that.
Include a field with the path and file name to the current products image in
another (usually invisible) control in the same section as you put the image
control
In the On Print event, add code like:

If Len(Me!txtImageFile)>0 Then
Me!ImageControlName.picture = Me!txtImageFile
End if
 
Thanks,
I'll work with that and see how I go.
If I have trouble I may be back <g>


I had put an image control, then used Build Event with
If me!image <> "" then
kmcImg.picture = "d:\catalog\images\"&Me!Image.Value
end if
but the process hung so badly every time I had to switch off machine to
recover.

Tks
kmc
 
Back
Top