Results 1 to 5 of 5
  1. #1
    TOPSie is online now Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    153

    The dreaded - A problem occurred while Microsoft Access was communicating with the OLE server or Act


    I have a working application which interacts with Outlook. I have a totally separate application which I am updating to also interact with Outlook
    In the new application I have created a blank form with a single button. The code behind that button is
    Code:
    Private Sub cmdEmail_Click()
      Dim OutMail As Object
      Set OutApp = CreateObject("Outlook.Application")
    End Sub
    When I click the button I get the dreaded error.
    I have matched the references of the new app with all the references in the old working appm - and both apps are on the same machine (so same versions of Access, Office etc etc)

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    For starters, you're setting a different variable than you declare.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    TOPSie is online now Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2021
    Posts
    153
    Ooops - tried so many things before I posted but even if I get the naming right it still fails, so sorry not that easy :-(

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,818
    Hi
    Usually find that if you create a new Blank database and then do an Import of your latest database.
    Then do a Compact & Repair
    Usually fixes this

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,550
    Are you sure the references are EXACTLY the same?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 1
    Last Post: 07-11-2022, 06:47 AM
  2. Replies: 2
    Last Post: 08-16-2020, 01:24 PM
  3. Replies: 1
    Last Post: 05-01-2020, 08:26 AM
  4. Replies: 4
    Last Post: 10-26-2018, 05:21 PM
  5. Replies: 2
    Last Post: 04-23-2013, 12:44 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