Page 4 of 4 FirstFirst 1234
Results 46 to 53 of 53
  1. #46
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    nice! So just add that statement at the end of the script?

  2. #47
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    hmm...must be doing something wrong. Seems to have ignored that statement completely.

  3. #48
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    At the end of what script? Certainly not after the send email code. And you of course must use your names, not the dummy aliases I used. Post the entire procedure code 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.

  4. #49
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Private Sub Command20_Click()
    Dim mess_body As String
    Dim appOutLook As Outlook.Application
    Dim MailOutLook As Outlook.MailItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)

    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)
    With MailOutLook
    .BodyFormat = olFormatRichText
    .To = Me.To_Address
    .CC = Me.CC_Address
    .Subject = Me.Mess_Subject
    .HTMLBody = Me.Text65 & Me.Text65 & Me.Combo71 & Me.Text73 & Me.Text67 & Me.Combo101 & Me.Mess_Text & Me.Text121 & Me.Text84 & _
    If Left(Me.Mail_Attachment_Path, 1) <> "<" Then
    .Attachments.Add (Me.Mail_Attachment_Path)
    If IsNull(Text65) Or IsNull(Combo71) Then MsgBox "Missing SC Ticket # and/or IMAC Code."
    Else
    'Send email
    End If
    '.DeleteAfterSubmit = True 'This would let Outlook send th note without storing it in your sent bin
    .Send
    End With
    'MsgBox MailOutLook.Body
    Exit Sub
    email_error:
    MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
    Resume Error_out
    Error_out:
    End Sub

  5. #50
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    If IsNull(Text65) Or IsNull(Combo71) Then
    MsgBox "Missing SC Ticket # and/or IMAC Code."
    Else
    'Send email
    '.DeleteAfterSubmit = True 'This would let Outlook send the note without storing it in your sent bin
    .Send
    End If
    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.

  6. #51
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    hmm...still ignores it for some reason.

  7. #52
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    disregard... I got it! I needed another End If statement. Thanks again June7

  8. #53
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I see that now. Running the procedure shouldn't have just ignored the code, should give a runtime error. Always Debug>Compile after code edits. The compile would have failed.
    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.

Page 4 of 4 FirstFirst 1234
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box values based on preceding selection
    By speckytwat in forum Access
    Replies: 11
    Last Post: 04-27-2011, 11:35 AM
  2. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  3. Visibility based on Combo selection
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-22-2010, 11:42 AM
  4. Replies: 2
    Last Post: 09-17-2010, 09:53 AM
  5. Replies: 1
    Last Post: 08-26-2009, 10:45 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