Display Image in Report (1 Viewer)

jeh35

New member
Local time
Today, 17:47
Joined
Apr 12, 2011
Messages
6
I’m struggling with what should be a simple problem. Each record in my database includes a field containing a hyperlink to an associated image file. The hyperlink is a relative address since the whole system is used from time to time on different computers.
Displaying these images in Forms and Reports requires that the image control contain the absolute path. Therefore I can’t set the image control directly to the link field in the record. I’ve got round this for Forms by using an Event Procedure on the After Update event that calls a decoding routine that, amongst other things, uses VBA to find the full path to the current folder, as well as performing some other checks.
Reports are a different matter, there being no equivalent at the record level to After_update and similar events. One helpful suggestion on the web is to add the path to the database files in the underlying query. That will work well for one computer but I don’t know any dynamic way to load the current path into a query.
Is it possible to do this? Alternatively could someone suggest a workaround?
I’m using Office 2010 under Win 7.
 

jeh35

New member
Local time
Today, 17:47
Joined
Apr 12, 2011
Messages
6
Solution found, with help from someone in another forum. The image control's data souce needs to be set to a local string function that interprets the relative link, gets rid of extraneous characters, prepends the rest of the path and takes the value of the total path to the image file in text form. Simple once you know how!
 

Users who are viewing this thread

Top Bottom