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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Hyperlink to Double Click 2

Status
Not open for further replies.

cstuart79

Technical User
Nov 2, 2009
171
US
Is there a way to change a hyperlink in Access to open on double click rather than single click? I have email addresses set up as hyperlinks/mailto: so as to automatically populate the "send to", but would like to have this set for double click so that the addresses can still be copied/pasted if needed.
 
How are they showing on the form? Are they showing in a data sheet view, or a text box or a label or a button?

If they are in a form control (text box, button, label, etc), then you just need to handle it with the control's events - Single Click, Double-Click, Hyperlink,etc.

The best way, I think would be to have the control not being "linkable" directly, but rather have the code call the hyperlink:
Code:
Private Sub MyTextBox_DblClick(Cancel As Integer)
  Application.FollowHyperlink("[URL unfurl="true"]http://www.tek-tips.com")[/URL]
End Sub

--

"If to err is human, then I must be some kind of human!" -Me
 
they were set to hyperlinks in table that is record source. therefore, they appear as hyperlinks in form view. however, i agree that it would be easier to set it up in Events. the only question i have is how to code for "mailto:" and have each record in a continuous form be unique.
 
As far as them being set as hyperlinks in the table, is it not possible to convert that column to text, instead, and have the vb code pull the text value out for the followhyperlink command?

As for the mailto: option, there are different methods of emailing stuff out of Access. I'd look into something like "Access VBA email" to get an idea of the options available. Some require you to go through security prompts, others do not.

--

"If to err is human, then I must be some kind of human!" -Me
 
yes, i can convert the hyperlinks to text instead and then use vb code in double click event.
however, can you clarify the code that i would use to have it open up an email with text in "mailto:"?

CODE
Private Sub MyTextBox_DblClick(Cancel As Integer)
Application.FollowHyperlink("not sure what would go here?")
End Sub
 
well, i got the mailto: functionality to work as far as opening up a new message upon double clicking, but i cannot seem to figure out how to have the To: populated with the unique email address?
i am putting the code in the double click event of the field on a continuous form. as i have thousands of addresses i can't feasibly write out a code

application.followhyperlink "mailto:" & "cstuart@yahoo.com"

for each!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top