Solved

ms access concatenate email hyperlink

Posted on 2014-07-24
3
630 Views
Last Modified: 2014-07-25
I'm using the following query to concatenate email address:
INSERT INTO tblEmail ( Operator, Email )
SELECT tblAging_Email.operator_name, [tblAging_Email]![assignee_name] & '@' & 'cdc.gov' AS Email
FROM tblAging_Email;

The tblEmail email field data type is set to hyperlink. When I click on the hyperlink field (email) in the tblEmail nothing happens. When I edit the email field I noticed that text to display is in the correct format (xbn8@cdc.gov) however the mailto is blank. Also, when I enter the email address manually it works fine. Any thoughts how I can resolve this problem. Thanks
0
Comment
Question by:shieldsco
3 Comments
 
LVL 25

Accepted Solution

by:
chaau earned 500 total points
ID: 40218430
the SQL format for hyperlink column when used in SQL is:
DisplayPart#hyperlinkpart#

Open in new window

The hyperlink part must include the correct protocol. For the email addresses the protocol is "mailto:".
Therefore, you need to modify your SQL statement to this:
INSERT INTO tblEmail ( Operator, Email )
SELECT tblAging_Email.operator_name, 
[tblAging_Email]![assignee_name] & '@' & 'cdc.gov' & "#mailto:" & [tblAging_Email]![assignee_name] & '@' & 'cdc.gov' & "#" AS Email
FROM tblAging_Email;

Open in new window

0
 
LVL 84
ID: 40219155
I would avoid the Hyperlink datatype and instead just store the email address in a standard Text field. You'll find them much simpler to update and work with that way, and you can always use the FollowHyperlink method to "launch" the email address:

Application.FollowHyperlink Me.YourEmailField
0
 

Author Closing Comment

by:shieldsco
ID: 40219279
Works Good -- Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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