Link to home
Start Free TrialLog in
Avatar of dan_nolan
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?
Avatar of rockiroads
rockiroads
Flag of United States of America image

Well u could not store as hyperlink
or change it at runtime

FollowHyperlink  Replace(myhyperlinkfield,"http:","mailto:")

ASKER CERTIFIED SOLUTION
Avatar of Eric Sherman
Eric Sherman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.