Office & Productivity Software forum

General discussion

mailto hyperlink field in access 2002

by lskeenan / September 9, 2006 1:47 AM PDT

I want email addresses in my access 2002 databases to show up as mailto hyperlinks, to that I can launch email by clicking on the addresses. If I change the field to "hyperlink" then when clicked the browser tries to find . Seems a simple thing... but I can't find how to format the field as an email address ANYWHERE! Thanks,

[Edited by: admin to edit e-mail address]

Discussion is locked
You are posting a reply to: mailto hyperlink field in access 2002
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: mailto hyperlink field in access 2002
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: mailto-hyperlink
by Kees Bakker / September 9, 2006 7:13 AM PDT


That seems easy.

It's not VERY smart of Windows to add http://www to the email-address, I agree.

But if you enter the hyperlink as mailto:user@provider.domain (thus something like Windows IS smart enough to recognize there's a protocol defined already (mailto, in fact) so it doesn't add the default protocol (http). So let's describe Windows as SOMEWHAT smart, or NOT THAT stupid.

This seems a reasonable work-around. You can make it still easier for the user, I think, by writing a after-change event procedure to add ''mailto:'' if it isn't already there.

Hope this helps.


PS. The preview mode shows the (lack of) smartness of the forum software. It DOESN't recognize the above 2 mailto:-thingies as a hyperlink, while it DOES do so with a http://-thing.
And let's hope that spiders searching this forum for email-addresses to send spam to aren't smart enough to extract your email-adress from your post.

Collapse -
after change event
by lskeenan / September 9, 2006 8:56 AM PDT
In reply to: Re: mailto-hyperlink

Thanks for the reply. Can you give me a little more information about ''writing a after-change event procedure to add ''mailto:'' "?

Very good point about putting in the email address. eeks. I tried to email a moderator to ask to have it changed.

Collapse -
Re: event procedures in Access
by Kees Bakker / September 9, 2006 8:13 PM PDT
In reply to: after change event


All fields on an Access form (in fact, all objects in Access) have properties, like color or type or size. And most have some form of event procedure, that's a piece of VBA-code (or a macro) that's executed if that event happens. One of the events is 'after change'. If the user changed the contents of the field and leaves it, it's activated.

All you've got to do: check if it's null. If not, check if it starts with "mailto:". If so, do nothing. If it's a string without this you might check if it LOOKS like an email-address (containing a @ and a . in the right sequence, and some other things) and give an error message if it doesn't. If everything looks fine, put "mailto:" in front of the value entered.

Any real-life Access application needs a lot of VBA-code to be workable. This is just a minor example.

Hope this helps.


PS. What I could do: I can't edit your post (only the forum manager can). But I can repost it (under my name, but I'll make the subject reflect that it's reposted for you), then repost the other posts in the thread and delete the original ones. I don't do it now, because you might have subscribed to that original one and won't get any alerts anymore. If you like the idea, please post so and I'll go ahead.

Collapse -
(NT) (NT) Lskeenan & Kees --FYI: e-mail address editied.
by Lee Koo (ADMIN) CNET staff/forum admin / September 11, 2006 2:46 AM PDT
Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Your favorite shows are back!

Don’t miss your dramas, sitcoms and reality shows. Find out when and where they’re airing!