email address, web address, hyperlinks, etc..

Mr.K

Registered User.
Local time
Yesterday, 21:51
Joined
Jan 18, 2006
Messages
104
I have a form bound to a table which stores contact info for a person. I have two controls that are email_address and website_address. I set them both as hyperlinks.
So now when the user clicks on the email_address Outlook opens a new message with an email_address in the To field. (I had to use a function found on this forum to replace the "htttp" with "mailto" on AfterUpdate event in order for this to work properly.) However, now trying to add some other features to my DB I ran into problems listed below. I wonder if I should have rather left that control as Text instead of Hyperlink, and use the DoCmd.SendObject on doubleclick event instead of using the above solution.
How people usually store email addresses and enable emailing on click?

The problems I ran into:
1) My main form is in popup mode and therefore right click on the hyperlink does not give an option to edit the hyperlink
2) I copied a function from this forum which gathers a list of emails and sends one message to the emaillist. However, my email list instead of generating as:
Code:
email1@a.com; email2@b.com
it generates as:
Code:
email1@a.com#mailto:email1@a.com#; email2@b.com#email2@b.com#

I guess I could extract the email using vba (not sure how), but I still don't know how to solve issue number 1. So maybe it is better to siwtch the field to plain text and forget the hyperlinks?

Thanks,
Mariusz

PS. What procedure on double click would open a default browser, since I also have to deal with web addresses and thought of turning them into text controls?
 
I format my email and web link fields as text. You can use the Application.FollowHyperlink function to open the link with a new browser window. I use the MailTo: command to open a new email with the email address filled into the To: section. Lots of samples within this forum on how to do both.
 

Users who are viewing this thread

Back
Top Bottom