Solved

ms access concatenate email hyperlink

Posted on 2014-07-24
3
614 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 24

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 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