dan_nolan
asked on
Format a hyperlink field to send an email
In Access 2003 I want to store email addresses in a hyperlink field. When my users click on the field I want it to open a new outlook email. It's currently storing the values as "http://". How do I make it store the values as "mailto:" without users having to type that in?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You don't need to store it with "mailto:" if you handle it anytime the email address is used.
But if you want to spare your users from typing it in, here's what I would do. Use the email textboxes exit event.
Private Sub txtEmail_Exit()
If Left(Nz(Me.txtEmail, ""), 7) <> "mailto:" Then Me.txtEmail = "mailto:" & Nz(Me.txtEmail, "")
End Sub
It's much the same as what etsherman posted.
But if you want to spare your users from typing it in, here's what I would do. Use the email textboxes exit event.
Private Sub txtEmail_Exit()
If Left(Nz(Me.txtEmail, ""), 7) <> "mailto:" Then Me.txtEmail = "mailto:" & Nz(Me.txtEmail, "")
End Sub
It's much the same as what etsherman posted.
or change it at runtime
FollowHyperlink Replace(myhyperlinkfield,"