I have an e-mail field in a form. The e-mails are stored as hyperlink. When I click the e-mail Outlook should start automatically.
Because access assumes that all hyperlinks start with http://
I need to find a way to transform the http://
I found the following code:
Private Sub EMail_AfterUpdate()
If InStr(Me!EMail, "@") > 0 Then
If InStr(Me!EMail, "#http") > 0 Then
Me!EMail = "#mailto:" & Mid(Me!EMail, 1, InStr(Me!EMail, "#http") - 1) & "#"
For some reason this doesn't work for me ! When I click an e-mail my browser is started not Outlook.
I don't think the code itself is the problem. The problem in my opinion is that the code is not executed when I click the e-mail.
What leads me to that conclusion is the fact that I put some syntax error in the code on purpose and didn't get an error message when I clicked the e-mail.
I have been trying to solve this problem for several hours now so I would really appreciate some help :)