Problem with linking in MS Acces

mboy

Board Regular
Joined
May 31, 2002
Messages
108
Hi' Guys

I have a problem linking to a file from forms. I have build a form to search for entrys in the database. In a textbox the path to the link is displayed so i thougt that just clicking the link now would execute the viewer and display the file but no it's apparently not that easy because the link don't work ????

I have inserted this frequenze in Queries (Link: "c:\documents\" & [DocumentId] & ".TIF") wich is displaying the actual path of the actual imagefile.

I have tryed in Forms under properies of the textbox to set "is hyperlink" to yes wich don't help either ?????

How will i make my path/link work Guys ?????

Reg. Mboy
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I dont know why your hyperlink is not working but you could try using the FollowHyperlink command in the onclick event of the control.
Application.FollowHyperlink Me.MyControl

where MyControl is the name of your control.

HTH

Peter
 
Upvote 0
Hi' Peter

Thank's for your answer.... But i have to get a littel more help i gues :)

I don't quite understand the part about my.control where am i suppose to put that part ??

Im sure you already know this but as you can se the link comes from merging other info so it's not constant so i can't predefine the link if it's what the my.control functions for ?

Mboy
 
Upvote 0
Hi' mdmilner

How will i check that ?? I tryed formatting the textbox as hyperlink, but don't know how to format text as hyperlink ??

Mboy

mdmilner said:
Do you have the text box formatted as a hyperlink?
 
Upvote 0
It goes in the code module behind the form. In design view click on you control and then in the property sheet select the "Click Event". Hit the build button (...) and select "Code Builder". This will take you to the form module and insert the first and last lines of the code for you, then just add the line I gave you, changing the names as required. you should end up with something like

Private Sub MyControl_Click()
Application.FollowHyperlink Me.MyControl
End Sub


HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,771
Messages
6,161,847
Members
451,723
Latest member
Rachetsely

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top