E-mail address in a table

  • Thread starter Thread starter Paul Martin
  • Start date Start date
P

Paul Martin

I have e-mail addresses stored in a table and viewable either in that table
or in a form.

At the moment they behave as hyperlinks and open explorer only to annouce
that the address cant be found.

How do i make them open a blank e-mail in outlook?

Thanks in anticipation

Paul Martin
 
The default hyperlink protocol is http:// To use the email protcol, you must
prepend the "mailto:" prefix to your email address. You can do it by
concatenation:

"mailto:" & [MyHyperlinkField]

I often use a label (which has a click event) or a standard text data type
to hold the email address, then use code to send the email, like:

Private Sub txtEMail_DblClick(Cancel As Integer)
Dim strMail As String
strMail = "#MailTo:" & Me.txtEMail & "#"
Application.FollowHyperlink HyperlinkPart(strMail, acAddress)
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
If you want to use a hyperlink field to send e-mails, the e-mail address
should be prefixed with "mailto:", e.g. mailto:[email protected]. You can
also use a standard text field, and put code like this in the on click event
for a command button:

Application.Followhyperlink "mailto:" & Me.emailField

or

DoCmd.SendObject To:=Me.emailField
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top