Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to Edit Hyperlink

Status
Not open for further replies.

tbac

Technical User
Jun 16, 2003
59
US
I have a hyperlink field and the user has to right-click and select Edit Hyperlink then browse to the file to insert a link. Could someone tell me the code to use if I want to have a Double-Click Event to Edit Hyperlink. Also is there a way to specify a folder to automatically browse to?
 
How are ya tbac . . .

You can use the API [blue]GetFilenameFromBrowse[/blue] (see my post here: thread702-1289131) to set the dir and extension to browse, using its return value to determine wether to update the hyperlink field. The double-click event would look something like:
Code:
[blue]   Dim Fil As String
   
   Fil = BrowseFiles() 'Get FileName from preset Dir!
   If Fil <> "" Then Me![purple][B][I]HyperLinkFieldName[/I][/B][/purple] = "#" & Fil & "#"[/blue]
The above assumes your not using any hyperlink text for display.

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top