Unanswered: Ye old image problem (this time with reports!)
OK, so here's the deal. I inhereted this database from the previous intern, and now my employer wants me to change things all around and, well, i'm stumped. Basically, here's the situation...
They want a photo based directory where there's a picture and under that is all the contact information. The contact info is in a table, and the location of a photo ("S:\\MembersDB\Photos\Name.jpg" for example) is stored in that table, as well. I was thinking that this would be really easy if I just used a report, but I can't seem to get those stupid little photos to show their heads. How do I talk my (well, the other intern isn't here, so it's mine now) database into showing those photos in a report so that it's all nice and pretty and my boss thinks I'm a genius?
I have a table with resident information in it, as well as a text field that has the path to a photo of that resident. I have a form that works nicely at displaying the photo and giving options to add/change or delete if necessary. I am now trying to display the photo in a report, and can't seem to get it to work. I have the text field named Photo (which has the path to the photo itself) and an Image control with the Picture property empty. I've tried using Me.Image4.Picture=Me.Photo however it doesn't seem to like it at all. I get Run-Time error 13 Type Mismatch. I would be most greatful if someone could give me some ideas of what I might be doing wrong. Thanks. I'm using Access2003.
I ended up using your example to see that the issue was null fields in the Photo path. So I added an If...Then to the On Format code of the report using
If IsNull(Photo) Then
Me.Image122.Picture= "Default Path"