Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create email message using sendObject (2003)

    I am currently using the following code to email a static message from within an existing form:

    Function EmaiSystemGroup_EmailTGroup()
    DoCmd.SendObject , "", "", "scottburke01@hotmail.com", "ITHelpDesk@hotmail.com", "", "Downtime Notification", "The X system will be down ", True, ""
    End Function
    ****
    I would like to be able to pull the values from two fields my form (UserCommunity - which is an email distribution group) and (SystemName) that would supply a information to fill in the "To" and "Message" values listed above. Can this be done by modifying the above code or will it need to be something else entirely? Thank you!

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

    Re: Create email message using sendObject (2003)

    That is easy. If the function EmaiSystemGroup_EmailTGroup (shouldn't that be EmailSystemGroup_EmailTGroup?) is in the module behind the form, you can use

    DoCmd.SendObject , , , Me.UserCommunity, "ITHelpDesk@hotmail.com", "", "Downtime Notification", Me.SystemName

    If the function is in a standard module, use

    DoCmd.SendObject , , , Forms!frmSomething!UserCommunity, "ITHelpDesk@hotmail.com", "", "Downtime Notification", Forms!frmSomething!SystemName

    where frmSomething is the name of the form (it must be open)

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create email message using sendObject (2003)

    Easy for you ;-)
    Thanks again Hans. I'll give it a try.

Posting Permissions

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