in message:
I currently have a database that has a field in it for email addresses. I
would like to be able to make that field in a form a hyperlink to mail to
that address.
Thanks for your help.
Here is a past post of mine on this issue which details how to send the
person an e-mail message by double clicking on that form field.
1. Make a field in the table called EmailAddress set as Text (not hyperlink).
2. Enter the e-mail addresses like so on the data entry form:
(e-mail address removed)
They will not have to type the "mailto" part
3. Code the double-click event of that field's control on the data entry form like so:
Private Sub EmailAddress_DblClick(Cancel As Integer)
On Error GoTo ErrorPoint
Dim strEmail As String
' Stop the Web Toolbar from appearing
DoCmd.ShowToolbar "Web", acToolbarNo
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
ExitPoint:
Exit Sub
ErrorPoint:
MsgBox "The following error has occurred:" _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " _
& Err.Description, vbExclamation, _
"Unexpected Error"
Resume ExitPoint
End Sub
Double-clicking on that field will bring up Outlook or Outlook Express
(assuming that is what you are using) with a new message and their e-mail
address already filled in.
And a KB article that may help as well:
HOW TO: Change the Values in a Hyperlink Field from an HTTP Address
to a MAILTO Address in Microsoft Access 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;323202
Hope that gets you going,