Problem in showing photos on form and report

Mansoor Ahmad

Registered User.
Local time
Today, 11:19
Joined
Jan 20, 2003
Messages
140
I want to show photos on a form and a report..

My present setup is as follows
I have been saving the photos in a separate folder on network. The main table in my database contain a column named photos which is set as hyperlink. On the form user enters a text in this field and then by right clicking over it, link it to the relevant photo.

So whenever you are on this record on form, you click on the hyperlink and it opens the photo.

What I want to do is to display the photo on form and also on report as well.

I have studied and searched for it and what I have understood is that it is only possible if you have a text field in a table where paths of photos is stored.

But as I have got a different system, is there a way where I can do it? I cannot store photos in a table because of their huge quantity.

Thanks
 
I have done the "form" part. Haven't gotten around to the "report" part but it should be similar. Warning, it will depend at least somewhat on the settings on your printer, because printing photos depends on different factors than displaying them. On the other hand, it is something you can experiment with using your printer's advanced setup functions.

OK, here is the way I did the "form" part. I built a form with an unbound image object. In the underlying recordset, all I had was the name and path of the file, not the binary object that was the picture itself. (Plus, of course, other information I was keeping to help categorize the photos.)

In the form's OnCurrent event, I loaded the file spec for the photo to the image control's .Picture property. (I think that was it, anyway. I'm not at a place where I can verify that at the moment.) As long as your Access installation options included the conversion/display tools required to understand that particular image format, it should work. You have to assure that the .PictureType is NOT set to embedded.

You might also want to just look in the help files for keyword "Image" and read the topics on properties. Important options for you might include the .PictureSizeMode, which lets you define whether the image is clipped, stretched, or zoomed. Each has its advantages and disadvantages. Also, you might wish to examine .PictureAlignment and .PictureTiling (which is a forms-only) option.

If you prefer to use the .Hyperlink method, which is possible, you must remember to convert the path to UNC format if the link is to lead to another folder on your current machine. But the hyperlink doesn't do the same thing as the method I described above.
 

Users who are viewing this thread

Back
Top Bottom