Email addresses

  • Thread starter Thread starter Ann Shaw
  • Start date Start date
A

Ann Shaw

Hi

I was wondering if it was possible to set a Hyperlink data
type for email addresses so that when clicked in table or
form, the email program could automatically come up.

Eg: In my table I have customer details and one of the
fields is email address. The web site works ok but I want
to be able to call up the email new messge to send to this
person straight from the database - I have checked but
cannot find a macro to do this and I am not well up on VBA.

Can anyone help???

Thanks

Ann
 
Ann,

I have had a little experience with this. The only way I could get this to
work is when entering the data in the E-mail address field, precede it with
"Mailto:":

mailto:[email protected]
mailto:[email protected]

I know that is a pain in the butt way of doing things. And if you have a
lot of e-mail addresses already stored, it will be a huge hassle to change
them all manually. You might be able to create an Append Qurey to ad the
"mailto:" to the begining of each email address.

If there is anyone else out there that knows more and can be of more help
than I, Please do so.

Thank you,

Conan Kelly
 
Just an FYI, it should be an Update query. I apologize,
I do not have much experience getting an email link in a
table to work.
 
Ann Shaw said:
Hi

I was wondering if it was possible to set a Hyperlink data
type for email addresses so that when clicked in table or
form, the email program could automatically come up.

Eg: In my table I have customer details and one of the
fields is email address. The web site works ok but I want
to be able to call up the email new messge to send to this
person straight from the database - I have checked but
cannot find a macro to do this and I am not well up on VBA.

Can anyone help???

Thanks

Ann

I've found the easiest way to do this is not to use a hyperlink field at
all (which tries vary hard to make everything be a web address), but to
use a text field for the e-mail address instead. Then I use code (in a
form) to create a mail message when the field is clicked on, or
double-clicked. For example:

'----- start of example code -----
Private Sub EmailAddress_DblClick(Cancel As Integer)

Dim strEmail As String

If Not IsNull(Me.EmailAddress) Then
strEmail = Me.EmailAddress
If Left(strEmail, 7) <> "mailto:" Then
strEmail = "mailto: " & strEmail
End If
Application.FollowHyperlink strEmail
End If

End Sub
'----- end of example code -----

Now, you can't use this method if you want to work in table datasheets,
but I prefer not to show them to the users anyway.
 
Thanks guys

I tried the code but I'm not great on VB. The mailto:
option worked a treat.

Thanks a million

Ann
 
Back
Top