Results 1 to 9 of 9
  1. #1
    Peacekeeper is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    5

    Automatic Email

    I am working on a batabase and I want it to E-Mail the right person when fields are changed. I have a code in place that will notify all if form is updated but I do not want everyone to get E-Mails that do not pertain to them.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You will have to somehow filter the email list with criteria to exclude irrelevant addresses. We have no idea what makes a person the 'right' person. Also don't know how you are sending notices.

    Not enough information about your project for specific guidance. Provide more info about your issue and even attach the db for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Peacekeeper is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    5
    This is what I have now but I would like to add the description and als where is says Case Else I want to send to all 3.

    Private Sub Form_AfterUpdate()
    Dim SendTo As String
    Dim Body As String
    Dim Subject As String
    Dim Partno As String
    Dim Descript As String
    Dim Dispo As String
    Partno = Combo49
    Descript = Description
    Dispo = Disposition
    Select Case [Buyer Code]
    Case Is = "03"
    SendTo = "Sam.Kong@Vacon.com"
    Case Is = "04"
    SendTo = "Cynthia.Burkett@Vacon.com"
    Case Is = "05"
    SendTo = "Rod.Snider@Vacon.com"
    Case Is = "06"
    SendTo = "Cynthia.Burkett@Vacon.com"
    Case Is = "08"
    SendTo = "Patty.Culbertson@Vacon.com"
    Case Is = "09"
    SendTo = "Patty.Culbertson@Vacon.com"
    Case Is = "11"
    SendTo = "Patty.Culbertson@Vacon.com"
    Case Else
    SendTo = "Sam.Kong@Vacon.com""Patty.Culbertson@Vacon.com""Cy nthia.Burkett@Vacon.com"
    End Select

    Subject = "Notification of Nonconformance for Part #" & Partno
    Body = "Part #" & Partno & "Part has been entered due to nonconformance."
    DoCmd.SendObject acSendNoObject, , , SendTo, , , Subject, Body
    End Sub

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You want Description included where - in the Body? Just concatenate it into the string. What is als?

    The SendTo must be a single text string:
    "Sam.Kong@Vacon.com;Patty.Culbertson@Vacon.com;Cyn thia.Burkett@Vacon.com"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Peacekeeper is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    5
    Subject = "Notification of Nonconformance for Part #" & Partno
    Body = "Part #" & Partno & "Part has been entered due to nonconformance." "Discrep"
    DoCmd.SendObject acSendNoObject, , , SendTo, , , Subject, Body
    End Sub

    I want to add the discrepancy to the body

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You must concantenate with ampersand (&) just as you did with Partno.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Peacekeeper is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    5
    But I want it to be a second line . I want it to say bla bla bla part entered then the second line to state the discrepancy

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Discrepancy or Description? I don't see a variable Discrep.

    Might be able to force carriage return line feed with:

    Body = "Part #" & Partno & "Part has been entered due to nonconformance." & vbCRLF & Descript
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Peacekeeper is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    5
    That worked great. Thanks alot for you time and help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-23-2011, 08:07 AM
  2. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  3. send email to email addresses in database?
    By cnstarz in forum Access
    Replies: 5
    Last Post: 03-02-2011, 09:46 PM
  4. Email from report to Email body
    By Ehmke66 in forum Programming
    Replies: 4
    Last Post: 01-03-2011, 01:06 PM
  5. Automatic Syncronization
    By Katada in forum Programming
    Replies: 0
    Last Post: 04-25-2006, 03:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums