Runtime error -2147221164 (80040154) Class not registered
While compiling MS Access database if error "class not registered" is coming, it means reference library is missing. We can test the particular database on another machine to check whether this is system library issue or database issue. If MS Access database not working on other machine then might its issue with database or code and if it's working on other system, then definitely reference library is missing or not registered. And sometime this issue may arise due to corrupted database. We can decompile the database for resolving this error or we can simply add the reference of DLL in Visual basic editor. But still if issue persists as shown in Fig 1.1, then it might be cause as given below.
This error may be cause of installation of Windows updates and security patches. Because of that files may be corrupted.
This error can arise due to change the Access version i.e. uninstalling the version of Access and use the database on another Access version.
Or reference component is missing
Decompile the database:
Type in Run command prompt: msaccess.exe /decompile.
Then open that particular MS Access database. Open up any module. Compile it via Debug, Compile and save.
Go back to the database and Compact it. The location of the Compact command varies by Access version.
After compilation we can check the redundant code remove.
If the problem persists again, then we have to Repair Microsoft Office Access.
Repair Microsoft Office:
Go in the Control panel of the System and select the "add and remove program option". Then right click on Microsoft office and select repair option as shown in fig 1.2.
If we already know which DLL is missing, then we don't need to do anything. Just we had to open run command prompt and type: regsvr32 filename.dll
It is advised that the information provided in the article should not be used for any kind formal or production programming purposes as content of the article may not be complete or well tested. Access Guru will not be responsible for any kind of damage (monetary, time, personal or any other type) which may take place because of the usage of the content in the article.
Copyright © 2019 ERP Makers