Hyperlink Question

basicuser

New member
Local time
Yesterday, 16:37
Joined
Nov 4, 2009
Messages
4
I am trying to put together a database to help gather and collate information about a number of products.

As well as being able to store, search and view the information on a form, I also have pictures of the product which somehow I would like to link in.

I would like to input a hyperlink into the form so that when returning to view and search for a product if I click on the hyperlink it opens an image of that product.

I am planning on creating an Image folder in the route database folder with the name of the image, matching one of the cells in the form.

Is there a sum or formula that will point the hyperlink automatically for each of the products or do I have to manually create and point the hyperlink for each one?

Thankyou for you advice in advance!

Andrew
 
What I would do is launch IE Directly and load the specific image, the name of which is stored in your database...

Code:
Sub LaunchInternetExplorerWithAPictureShowing()
  VBA.Shell _
    InQuotes("c:\Program Files\Internet Explorer\iexplore.exe") & " " & _
    InQuotes("C:\Users\Lag\Pictures\0000 Graphic\AresEngine.jpg")
End Sub

Function InQuotes(text As String) As String
   'wraps everything in quotes
   InQuotes = Chr(34) & text & Chr(34)
End Function

So in response to a button click, assuming the image name field, say ImageName exists on the form...
Code:
Private Sub ShowImage_Click()
  VBA.Shell _
    chr(34) & "c:\Program Files\Internet Explorer\iexplore.exe" & chr(34) & " " & _
    chr(34) & Me.ImageName & chr(34)
End Sub
 

Users who are viewing this thread

Back
Top Bottom