Results 1 to 3 of 3
  1. #1
    Tlo is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    41

    Error 2287: Microsoft Access Can't open the mail session.

    I have code behind a button that triggers an email be sent (via Outlook) to notify a user of a change. I'm getting this message on one of 35 user's machine, and this message only started appearing today --- this user has been using the application for a year. I've done research online and what I've found points to corruption in Outlook or some other feature of Windows. I am bamboozled as to why, all of the sudden, this is a problem. Every other user is able to perform this task (click a button, send an email) without issue, which tells me it's not an error in the code but something particular with this user's machine. I've even installed another front end on the machine, but receive the same error message.

    Can anyone offer any insight to this? Any help would be greatly appreciated!!

    SetUp: Outlook 2016 32-bit, Access 2016 32-bit, front end installed on each user's desktop, back end installed on server, Windows 7 professional.



    CODE:
    Code:
    On Error GoTo cmdErrHandler
    
    
    Dim ctl As Control
    Dim ol As Object
    Dim strProperty As String
    Dim strCC As String
    
    
    Select Case Me.ENHEstStatusID_FK
        Case 3, 4, 5
            MsgBox "Estimate Is Already Marked Complete, Won, or Lost", vbCritical, "Error"
            Exit Sub
    End Select
    
    
    [Forms]![ENHfrmProposal]![ENHfrmProposal_Services]![ENHRevenueStreamID_FK].Enabled = False
    [Forms]![ENHfrmProposal]![ENHfrmProposal_Services]![ENHRevenueSubStreamID_FK].Enabled = False
    [Forms]![ENHfrmProposal]![ENHfrmProposal_Services]![cmdDeleteService].Enabled = False
    
    
    If Me.OperationsManagerID_FK.Value = 38 Then
        strCC = "eric@crabapple.com"
      Else
        strCC = ""
    End If
    
    
    Set ol = GetObject(, "Outlook.Application")
    
    
    strProperty = DLookup("strPropertyName", "tblProperties", "[PropertyID] = " & Me.PropertyID_FK)
    
    
    If ol Is Nothing Then
        GoTo cmdErrHandler
      Else
        If MsgBox("Are You Sure You Want To Mark Complete?", vbYesNo, "Confirm Complete") = vbYes Then
            If MsgBox("Do You Want To Send Notification Email?", vbYesNo, "Email") = vbYes Then
                DoCmd.SendObject acSendNoObject, , , Me.Email, strCC, , "Estimate Complete For " & Me.EstimateDescription.Value & ": " & strProperty, _
                    "The estimate for " & Me.EstimateDescription.Value & " has been completed.  Standard pricing comes to " _
                    & Format([Forms]![ENHfrmProposal]![ENHsfrmEstimatePrice]![SumOfStandardPricing].Value, "Currency"), True
            End If
          Else
            Exit Sub
        End If
    End If
    
    
    Me.ENHEstStatusID_FK.Value = 3
    Me.Requery
    '[Forms]![ENHfrmProposal]![ENHsfrmEstimatePrice]![ENHEstFinalPrice].Visible = True
    DoCmd.RunCommand acCmdSaveRecord
    
    
    Set ol = Nothing
    Set ctl = Nothing
    
    
    cmdErrHandler:
        If Err.Number <> 0 Then
            Call ErrorLog(Err.Number & ": " & Err.Description, "cmdMarkComplete_Click()", "ENHfrmSchedule", [Forms]![frmManagement_HiddenLogIn]![Manager])
        End If
        
        Select Case Err.Number
            Case 0
                Exit Sub
            Case 2501
                If MsgBox("Email Was Not Sent, Would You Like To Send Now?", vbYesNo, "Email Not Sent") = vbYes Then
                    Resume
                  Else
                    Exit Sub
                End If
            Case 429
                MsgBox "Outlook Is Not Running; Please Open Outlook And Try Again", vbCritical, "Outlook Not Running"
                Me.ENHEstStatusID_FK.Value = 2
            Case Else
                MsgBox Err.Number & ": " & Err.Description
    
    
        End Select

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    is Outlook still in the references in vbe?
    (alt-F11, tools, references) look for a MISSING checked item

  3. #3
    Tlo is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2016
    Posts
    41
    Sorry for the delay in response. I was on the phone with Microsoft last night for over an hour. This is a bug that only affects users that have Version 1807 (Build 10325.20082) and are using Windows 7. As of August 6 a Microsoft engineer posted in a forum that a release was coming out soon that fixes this. Just for anyone who is viewing this thread and having a similar problem. There's also a bug that causes "Unrecognized Database Format" error, which crashes my system. It has to do with a user opening an accde file in a version earlier than what it was saved in. FYI.

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

Similar Threads

  1. Replies: 11
    Last Post: 07-13-2018, 04:43 PM
  2. Replies: 2
    Last Post: 02-01-2018, 08:39 AM
  3. Replies: 2
    Last Post: 01-15-2018, 07:46 PM
  4. Replies: 1
    Last Post: 09-26-2012, 11:01 AM
  5. Replies: 6
    Last Post: 11-18-2010, 04:00 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