Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in my report

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
US
Ive searched all of the Access forums, and I haven't found a solution that works. This seems like a very common procedure so im sure someone out there can help.

My ITEM table looks like this:

name | imagepath
-----------------------------------------------
Linksys Cable/DSL Router | d:\lsBEFSR41.jpg
Netgear Switch | d:\ngFS105.jpg

Name is the name of the product, and imagepath is where the photo is stored on my drive. My report pulls NAME, IMAGEPATH from ITEM table for the specified ID. I want to show the name of the product, and its corresponding picture on my report.

For this discussion, lets say the two objects on my report are named itemName and itemImage. I would assume this is as simple as setting some property of itemImage to the IMAGEPATH field, but ive been unable to figure this out. Please provide any help that you can. Id be willing to receive an email with a sample MDB file if thats what I have to do.

thanks in advance, im really hurtin here.
 
The following code is how I setup a unbound object in a form to display a image based on a image path. Obviously its a form action but it should work on report field references. Try substituting the report!XXXXX convention instead of the ME!

Private Sub Form_Current()
On Error GoTo ErrorHandler
Me![ImageFrame].Picture = Me![ImagePathway]
Exit Sub
ErrorHandler:
Me![ImageFrame].Picture = Me![ImageErrorDefault]

End Sub
 
hi qwkvst, thanks for responding.

I got a solution to this already in thread703-289517

I appreciate your responding though. Looks like you have an error handler that would display maybe a default image if no image was available or if the image path was wrong?

Ill try to add that too, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top