Solved

ms access concatenate email hyperlink

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

Technology Partners: 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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

738 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