Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Texas, USA
    Posts
    374
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How to create an email address field? (2002)

    I don't know how to set the properties of a field to store email address. I tried to set the field property as Hyperlink. But, it seems that Hyperlink is only set for URL, not email address.

  2. #2
    Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington, USA
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to create an email address field? (2002)

    My guess is that mailto needs to in there. Perhaps Access Help has more under mailto.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to create an email address field? (2002)

    I use a text field and append "mailto:" to the beginning of the field when I use it to send an email to that address.
    HTH

  4. #4
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Maine, USA
    Posts
    258
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to create an email address field? (2002)

    You can set the format to hyperlink, and be sure to put mailto: (with the colon) directly in front of the email address, as Thomas W suggested (but I do it in a hyperlink field, not a text field). Then you can just click on it and it generates an email message using your default email client.

    This will not work, as near as I can tell, if you will be combining email addresses for mailing to multiple addresses, and it will look funny if you intend to print those addresses in an address list or something, but if you need to do that I have some workarounds that we use that I can help you with.

    -cynthia

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to create an email address field? (2002)

    I have had this problem recently and in the end settled setting the field properties as text and for the folowing example called it [email].

    I set up a form with some client details and then put a command button with the following VBA:

    Private Sub cmdMail_Click()
    On Error GoTo handler

    DoCmd.SendObject acSendNoObject, , , [Email], , , "Report"
    Close

    handler:
    DoCmd.CancelEvent

    End Sub

    The error handler was set at cancelevent as it kept on coming up with error 2501 which for some reason I could not trap.

    I hope this is what you need
    Jerry

  6. #6
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Texas, USA
    Posts
    374
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: How to create an email address field? (2002)

    Thanks for the codes. Two questions on the codes:

    1. How to prevent the Choose Profile Windows from popping up when this VBA is executed? I have already set the selected profile as the default profile in the Choose Profile window. Unfortunately, it still pops up.

    2. Your codes set the Report as the default value in the Subject area. How to set no value in the Subject area and the cursor stay in the Subject area when email client is launched?

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to create an email address field? (2002)

    Hi Dennis

    With regards to question 1; To tell you the truth , I don't know <img src=/S/brainwash.gif border=0 alt=brainwash width=15 height=15>, It appears to be a glich that comes up when I run it sometimes..is there anyone out there that can help?

    Question two is a little easier, to remove "Report" from the subject header, replace with :
    DoCmd.SendObject acSendNoObject, , , [Email]

    This will give you a blank To: and Subject: with a blank message, the commeas after acSendNoObject are for To:, CC:, BCC:, Subject: Message
    Jerry

Posting Permissions

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