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

e-mail addresses

Status
Not open for further replies.

IKinal

Technical User
Apr 14, 2003
32
US
Hi,

I have a field in my table that contains e-mail addresses, and I want to convert the field into a hyperlink field so that clicking on the address will start a new mail message. Unfortunately, when I make the field into a hyperlink, it defaults to creating website links, i.e. . I can manually go in and change this to a mailto link, but I don't want to do that for every entry. Is there any easier way to perform this conversion?

Thanks,
I. Kinal
 
I. Kinal

One way to do it would be to use an Update query, which would have one column only - the name of the field which contains the e-mail addresses in your table. The Update line in the column would be...
IIf(Left([e-mail],8)<>&quot;#mailto:&quot;,&quot;#mailto:&quot; & Left([e-mail],InStr(1,[e-mail],&quot;#&quot;)-1),[e-mail])

This example assumes that the field is named [e-mail]. If not, you will have to change that to your field name in the 4 places where [e-mail] occurs.

Also I would suggest viewing the results before you run the query, so that you can see whether it's going to work out as you desire...just to be on the safe side.

Tom
 
Thanks, that worked. After that I did some more experimentation because I didn't like seeing the mailto: text. I ran another update query to remove it, and things still work fine, and the problem is solved!

I. Kinal
 
I. Kinal
I thought you had to have the &quot;mailto:&quot; prefix in the Hyperlink field if you wanted to have it bring up a new message in Outlook Express. Perhaps not.

Tom
 
It actually appears that as long as I have a # before the e-mail address (which gets hidden from view), clicking on the hyperlink will bring up a new mail message. Basically once I got rid of the http:// that Access inserted, I was fine. It could also be something about my setup; I'm running Access 2003 and Outlook 2003.

I. Kinal
 
I. Kinal

I use Office 2000. Maybe things are a little different in 2003.

But the main thing is that you got it working.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top