Results 1 to 7 of 7
  1. #1
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168

    Hyper Link Email Addresses

    Good Morning and Happy Monday to everyone.

    I have a form with contact information Name, Phone, Email address.

    I am curious as to how to make the Email address a Hyperlink to open outlook with a new email and the address loaded, Just like MS Word or Excel does.

    And as a bonus follow up question, what would it take to have that hyperlink open the users default email program

    Thanks for the help

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Just make the control a hyperlink?
    I have just done that to a control, added a valid email address and it opened in my default mail program Outlook 2007?

    Only drawback is that if you click into the control and it has value then the hyperlink is followed.?

    Perhaps use Application.FollowHyperLink on a doubleclick of the control instead, prefixing the control value with mailto:

    Not tested the last option though.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    isnt the hyperlink: "mailto:" & txtBoxEmail

  4. #4
    Tuckejam is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2020
    Posts
    168
    Thanks for the help,

    So far I have it displaying the Email addresses as a hyperlink but clicking on them does nothing

    I don't think I understand the "Mailto:" &txtBoxEmail and/or what i should be putting in the HyperLink Target Property

    Click image for larger version. 

Name:	Capture.PNG 
Views:	15 
Size:	39.9 KB 
ID:	45069
    Thanks again for the help

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    This reads like you're formatting the text in the control only. If your table field is short or long text, change it to Hyperlink and you won't even need mailto: in the control properties. If not, I think you'll have to use code because all you seem to be doing is changing how the control value looks.

    EDIT - that's based on having an actual email address in the table as suggested in post 2. You're saying you have an email address in the control or field but you're showing some sort of placeholder value, which isn't a valid address.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    No. If you make the control a hyperlink and put in a valid email address, Access inserts the mailto: prefix. Try it, it takes 10 seconds to test.

    That is how it worked when I did that in one of my DBs.

    If you do not want to make the control a hyperlink for some strange reason, then you would need to emulate what Access did so as to make it a valid hyperlink for the FollowHyperLink function.?

    That is how I see it working.?

    Quote Originally Posted by Tuckejam View Post
    Thanks for the help,

    So far I have it displaying the Email addresses as a hyperlink but clicking on them does nothing

    I don't think I understand the "Mailto:" &txtBoxEmail and/or what i should be putting in the HyperLink Target Property

    Click image for larger version. 

Name:	Capture.PNG 
Views:	15 
Size:	39.9 KB 
ID:	45069
    Thanks again for the help
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    If you make the control a hyperlink and put in a valid email address, Access inserts the mailto: prefix. Try it, it takes 10 seconds to test.
    True. but as I said, HouseEmail is hardly a valid url. I think OP needs to copy db and maybe alter sensitive info/remove unnecessary, compact, zip and post here.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting a concatenated string into a hyper link
    By AndyRob1973 in forum Queries
    Replies: 13
    Last Post: 10-09-2020, 11:17 AM
  2. hyper link in vba email code
    By baronqueefington in forum Programming
    Replies: 2
    Last Post: 02-06-2015, 02:38 AM
  3. Export attach field and replac with hyper link
    By ahmadrezaahmad in forum Import/Export Data
    Replies: 1
    Last Post: 07-20-2013, 01:03 PM
  4. Replies: 1
    Last Post: 11-01-2012, 09:49 AM
  5. Hyper link from a Form and query
    By ajrourke in forum Programming
    Replies: 0
    Last Post: 05-09-2011, 12:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums