I have what should be a simple problem, yet so far I’ve not found a solution although it must have been solved by others a few zillion times. A post about it to Access World Forums generated plenty of reads but no replies. Can anyone help here?
Each record in a table in my Access 2010 database includes a field containing a hyperlink to an associated image file. The link has to be stored as a relative address since the whole system (database plus image files) is used from time to time on different computers.
Displaying images in Forms and Reports seems to require that the image control contain the absolute path. Therefore I can’t set the image control directly to the link field in the record. This is easy to deal with when the image is needed in a Form. An Event Procedure on the After Update event 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 in Report properties to After Update and similar events in Form properties. 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, where the path is fixed and thus can be hard-coded into the query, but I don’t know any dynamic way to load the current path into a query. Is it possible to do this?
Alternatively, and perhaps better, could someone please suggest another way of displaying the images?
I hope this is a clear descrption of the problem. I'm using Win 7.