Hyperlink Image

K

KR

I have a form that has a hyperlink on it so that when you click on it, it
will open a record specific to each record in the form.

Example:
Each patient has there own record and when I click on the hyperlink it opens
a PDF that is specific to each patient.

Can someone please help me insert an image as my hyperlink that will still
open those specific files and not just go to the location where all the files
are stored?

Here is the information that I think you will need to help me.
Name of Form: PhysiciansNotProctoredSUBFM
Field name that the hyperlink is in: ImplantRegsitrationForm
Name of Image I want in place of the hyperlink text box: OLEUnbound6

I would really appreciate any and all help!!! Thank you so much!
 
A

Arvin Meyer [MVP]

I would use 2 fields to store this data. In the first, I'd store the path to
the image that you want to display in an image control. Now use the form's
Current event to display the image:

Sub Form_Current()
Me.ImgCtrl.Picture = Me.txtImagePath
End Sub

then I'd use the Click event of the image control to open the file:

Sub ImgCtrl_Click()
Call fHandleFile(Me.txtFileToOpenPath)
End Sub

The fHandle file function uses the ShellExecute api and can be found here:

http://www.mvps.org/access/api/api0018.htm

Place it in a standard module, and you can call it from anywhere in the
database.
 
K

KR

I'm sorry I am not following. The image I have is already on the form and I
want to be able to click on it and have it take me to where the hyperlink
would take me if I clicked on it but I don't want the hyperlink to be
displayed on the form at all just the image...Sorry I am new at this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top