Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Oct 2005
    Location
    Kansas City, Missouri
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Email from Access (2000)

    Is there a way, when viewing a record (any record) in a form, to click in a field (email address in this case) and it open a blank email (within Outlook) where it has inserted the email address you clicked on into the TO: field of the email? ( a mailto function ). I played around with the hyperlink property of the control but I don't the desired result.

    Thanks in advance.
    sprater@adaptiveecosystems.com

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Email from Access (2000)

    That's pretty much what the hyperlink field is all about. However if you are editing it, then it usually takes a double click or a CTRL-click to follow the hyperlink. For that reason on forms we often provide a control that is associated with the record that does either a SendTo or uses Automation to start an email.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Email from Access (2000)

    Wendell already mentioned the possibility of using a hyperlink field. If the field is a plain text field, you could use code to create the e-mail; I would prefer using the On Dbl Click event or a command button next to the text box instead of using the On Click event, for the latter would make it hard to edit the e-mail field. Say that the text box is named txtEmail.

    Private Sub txtEmail_DblClick(Cancel As Integer)
    Application.FollowHyperlink "mailto:" & Me.txtEmail
    End Sub

    or

    Private Sub txtEmail_DblClick(Cancel As Integer)
    DoCmd.SendObject , , , Me.txtEmail
    End Sub

  4. #4
    Lounger
    Join Date
    Oct 2005
    Location
    Kansas City, Missouri
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Email from Access (2000)

    Thanks guys, got it to work. I used:

    Private Sub txtEmail_DblClick(Cancel As Integer)
    Application.FollowHyperlink "mailto:" & Me.txtEmail
    End Sub

    Worked perfect! Thanks again!

Posting Permissions

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