none
Getting "Class not registered" Error in ACCESS 365 RRS feed

  • Question

  • Have an ACCESS application the runs perfectly on an office 7 machine with ACCESS 10. Suddenly the app bombs with "Class not registered" error "-2147221164(80040154)" on the open of an ADO recordset.  Here is the code:

        Dim Colcon As ADODB.Connection
            Set Colcon = CurrentProject.Connection
            Dim ColRs As New ADODB.Recordset
            ColRs.ActiveConnection = Colcon

        Dim ColSQL As String
        ColSQL = "SELECT ColTbl.LastDate, ColTbl.ColCode"
        ColSQL = ColSQL + " FROM ColTbl"
        ColRs.Open ColSQL      'Bombs Here

    Have no idea what this error means or how to fix it.  I have repaired and compressed the database, and repaired office with bothe the quick repair and the online repair (twice)

            

    jpl458

    Thursday, June 30, 2016 7:06 PM

All replies

  • Hi,

    Based on your description, I'll move your question to the MSDN forum for Access

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=accessdev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Regards,

    Emi Zhang
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, July 1, 2016 6:01 AM
  • Hi jpl458,

    To check whether it is related with Access product or this special Access database, I would suggest you create a new Access database in this machine with ADO to check whether it will work.

    In addition, the link below might be useful to you.

    # Error -2147221164 Class Not Registered when calling recordset.Open()

    http://stackoverflow.com/questions/25434782/error-2147221164-class-not-registered-when-calling-recordset-open-on-windows

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, July 5, 2016 5:41 AM
  • I did create a new database with a simple table and got the same error on the open

    jpl458

    Tuesday, July 5, 2016 6:08 PM
  • Hi jpl458,

    Which Access version you installed? Did you install multiple Access version?

    1. I suggest you check VBA Editor-> Tools-> Reference-> Check whether there is any missing reference.
    2. VBA Editor->Debug->Compile database and resolve the error

    For a general suggestion, I suggest uninstall/reinstall Office.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, July 6, 2016 6:45 AM
  • Edward, one of the first things I did was to create a new database with a simple table and write new cod for the ADO connection and record set.  But, I got exactly the same result.  I went through the link you provided and It's a tad above my knowledge level. Couldn't figure out the early and late binding and what variable in my code might be the culprit.  Still clueless in Chicago.

    jpl458

    Wednesday, July 6, 2016 4:57 PM
  • Hi jpl458,

    What do you mean with Access 365 and Access 10? Have you installed multiple Access version?

    For a later binding, you could try something like below:

             Dim Colcon As Object
             Set Colcon = CurrentProject.Connection
             Dim ColRs As Object
             Set ColRs = New ADODB.Recordset
             ColRs.ActiveConnection = Colcon
         Dim ColSQL As String
         ColSQL = "SELECT tblArea.AreaID, tblArea.UName"
         ColSQL = ColSQL + " FROM tblArea"
         ColRs.Open ColSQL      'Bombs Here

    Based on your description, I assume your issue is related with Office product, I would suggest you uninstall/reinstall Office.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, July 7, 2016 6:24 AM
  • I have Office 365 and Windows 10- Sorry for that. I Corrected your code for ColSQL, ran it and it bombed at the some point with the same error.  I have already downloaded a new version of office and that changed nothing. At this point I think the problem might be with windows 10 rather than Office 365, or a combination of the two together.  What combination are you running and if like mine, does it work?  Thanks for the help.

    jpl

     

    jpl458

    Wednesday, July 13, 2016 11:13 PM
  • Hi jpl458,

    My environment is Excel 2013(Office 365) and Windows 10. To check whether it is related with your environment, I suggest you copy your database to other computers with Office 365 and Windows to check whether it will work.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, July 14, 2016 2:11 AM
  • Will try to locate such an environment and give it a go to see if it works.  Thanks again

    jpl458

    Friday, July 15, 2016 8:21 PM
  • Hi jpl458,

    Have your issue been resolved? Please feel free to share us your issue if you have any updates.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, July 20, 2016 1:21 AM