Sending an Email from an Access Form

J

JackBuff

I have a customer table which includes an email address. I have set up a
form for the table, and would like to send emails from this form by clicking
on the email hyperlink.

In OnExit for the field I have set the value to "Mailto:" & strEmail.
When I click I get 2 windows opened. One is Outlook, the other is IE trying
to go to url "http://strEmail.

I only want to open Outlook.

Can someone help.

Thanks
 
F

fredg

I have a customer table which includes an email address. I have set up a
form for the table, and would like to send emails from this form by clicking
on the email hyperlink.

In OnExit for the field I have set the value to "Mailto:" & strEmail.
When I click I get 2 windows opened. One is Outlook, the other is IE trying
to go to url "http://strEmail.

I only want to open Outlook.

Can someone help.

Thanks

Change the email hyperlink field (in the table) to a regular text
field. Store just the actual email address, i.e.
[email protected]

Then, using a form, code that control's Double-click event:
Application.FollowHyperlink "MailTo:" & [ControlName]

A text field is much easier to edit, and you needn't worry about the
user inadvertently clicking in it and sending an email.

It will open an email in whichever mail program is set up as the
default one.
 
Top