• How to create an email address field? (2002)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to create an email address field? (2002)

    • This topic has 6 replies, 5 voices, and was last updated 23 years ago.
    Author
    Topic
    #371000

    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.

    Viewing 3 reply threads
    Author
    Replies
    • #588442

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

    • #588444

      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

    • #588447

      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

    • #588571

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

      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

      • #588577

        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?

        • #588738

          Hi Dennis

          With regards to question 1; To tell you the truth , I don’t know brainwash, 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

    Viewing 3 reply threads
    Reply To: How to create an email address field? (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: