?
Solved

ms access concatenate email hyperlink

Posted on 2014-07-24
3
Medium Priority
?
652 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
chaau earned 2000 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 85
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 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