This is Ridiculous.....

davec69

Registered User.
Local time
Today, 08:33
Joined
Apr 4, 2003
Messages
19
This can't be this difficult. All I want to do is add an Image (already uploaded to my webserver) to a report in Access. Is there a simple way to reference an image that is located on a webserver, in an access report? I've tried adding a column to the table which holds the URL for the picture, but I can find no way to use that image address to show the image on the report. Is there a special control that can read a URL from a table, and display that image on a report? I have several thousand items in the database, and it would take forever to use the dialogue box to choose an image for each item. Any help would be appreciated.
 
Look up "Image" controls. You want to load the file spec of the picture to the image's .PICTURE property. You will also need to "play" with the various other properties relating to sizing, asymmetric and symmetric zooming, tiling, and a few other ways to load pictures to screen areas.

The trick to this is to associate the correct image with a particular record. There, I can only suggest playing with FileSystem objects to search for the image types. Let's say (for argument's sake) you used .JPG images. So you would set all of your images in a particular area. You would have to figure out for yourself what rule associates a particular record with a particular picture. You write some VBA code that you can trigger with maybe a button click. Make the code sweep your records for any that don't have a picture. For each such record, figure out what the picture-file name should be and use the file system object to find it. Open the record for editing in a recordset, add the file name to the appropriate field, and update that record.

For the form/report, you use different events.

For forms, OnCurrent is a good place to load the file name to the .Picture property of the image control. For reports, it might be more like OnFormat, I think.

If you weren't familiar with any of those, read up on them in the help files.
 

Users who are viewing this thread

Back
Top Bottom