Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Transparent sending of e-mail (Access 2000)

    I would like an E-mail to be sent to me everytime a user adds a record to the database telling me what they added. I know that Access has an already built in function for sending e-mail, but that is not transparent. I do not want an outlook e-mail box to open. I want the e-mail to be sent to me without the user knowing it was sent.

    Thanks
    Mike

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

    Re: Transparent sending of e-mail (Access 2000)

    DoCmd.SendObject has an optional argument EditMessage. If you specify True or omit it, the mail message is displayed, but if you specify False, the message is sent silently.

    Alternatively, you could use Outlook automation, but that is more complicated, and requires that ALL users have Outlook.

  3. #3
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Transparent sending of e-mail (Access 2000)

    Thank You. I have got it to work with one exception. I use the following code and when I make the name of the person someone where there are multiples of that person, it gives me an error.

    Dim message As String
    Dim message2 As String
    Dim name As String

    name = Forms![E_Mail-Learn]!txt_Name.Value
    message = Forms![E_Mail-Learn]!txt_body.Value
    message2 = "A user has added " & message & " to the database."

    DoCmd.SendObject acSendTable, "Aircraft", acFormatHTML, name, , , "Aircraft Database", message2, False

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

    Re: Transparent sending of e-mail (Access 2000)

    I don't understand, I thought you wanted to send mail to yourself, now it seems you ware sending mails to different persons.

  5. #5
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Transparent sending of e-mail (Access 2000)

    Initially, I will be sending e-mails to myself. I am thinking about the future. I may not always be the administrator of this database. I need to be able to send e-mails to whomever will take this database over. Because I have a unique name in the global list, it works fine for me.

    Mike

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

    Re: Transparent sending of e-mail (Access 2000)

    If the name of the recipient is ambiguous, the mail cannot be sent transparently, you must either cancel the mail altogether, or some kind of user intervention will be necessary.

Posting Permissions

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