Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: email hyperlinks in Access 2003

    I have been reading through here and have not been able to find the answer to my question. I have an access table with a field type as a hyperlink. In this field goes email addresses, however when the users click the email address instead of opening outlook it goes to a webpage becuase it is putting http in the front. I know how to change this if I needed to do it for 1 or 2 records but with thousands of records I dont want to go 1 by one editing the hyperlink. Is there a way to replace http with mailto instead. Please help, thank you in advance

  2. #2
    Join Date
    Aug 2004
    It seems that access assumes that all hypertext links are http unless you use code to tell it different.

    This is straight out the contacts database that comes with access... (at least with Acc2000 anyway)

    Create a small buton next to your email address field and chuck in the following on its click event

    Private Sub cmdEmail_Click()
    On Error GoTo HandleErr
        ' Save the record
        If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
        ' Make sure the hyperlink property is current
        ' We don't actually have to do anything here. The button uses its own
        ' hyperlink property to send mail, as specified in the Form_Current
        Exit Sub
        Select Case Err
            Case Else
                MsgBox Err & ": " & Err.Description, _
                 , "Form_Contact.cmdEmail_Click"
        End Select
        Resume ExitHere
    End Sub
    Private Sub EnableEmail()
        ' Update the email button
        On Error Resume Next
        cmdEmail.HyperlinkAddress = "mailto: " & Me!txtEmailName
    End Sub


  3. #3
    Join Date
    Oct 2003
    Thank you very much I will try this out and see how it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts