Solved

Format a hyperlink field to send an email

Posted on 2006-11-06
3
243 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:dan_nolan
3 Comments
 
LVL 65

Expert Comment

by:rockiroads
Comment Utility
Well u could not store as hyperlink
or change it at runtime

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

0
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 125 total points
Comment Utility
Kind of along the same lines as rockiroads solution .... Here what I generally do.

1.) Put a little command button on your form next to the email address field (you can use the picture of the email letter rather than text).  This way you can size it down.  Call it CmdEmail

2.) For the Form's OnCurrent Event enter ....  Me.CmdEmail.HyperlinkAddress = "mailto:" & Me!YourEmailControlName

Now, when the user clicks the Email button Outlook will open with the email address already filled in.  
Just replace YourEmailControlName with your actual control name on the form.

Also, you should include this code in the email address field's AfterUpdate event.

ET
0
 
LVL 4

Expert Comment

by:HKComputer
Comment Utility
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now