The other day I was doing a database modification for a long time customer, and I was compiling their database, when the compilation failed at a line of VBA code calling for a DAO object.
FYI: I originally designed this bit of code for a prior Access version and now they had upgraded to an Office 365 subscription. Apparently the admins didn’t install the DAO libraries, so I copied the DLL’s from another of my machines running an earlier Access 2016 version. After copying them over and pointing the reference to the dll, I didn’t get a compilation error.
Here are the dll files you can use
In your virus software prevents you from downloading this dll you will need to download these, and rename the extension to “dll”.
So here’s an interesting note
With an mdb version of the database running on Office 365, when I used the dao360.dll version and clicked “OK” I received the “Error In Loading DLL” message. However, when I used the dao350.dll version and clicked “OK” I received no errors and all ran great.
I needed to use the accdb version. When I did the same with the accdb version, and clicked “OK” I received the “Error In Loading DLL” message.
With the accdb version and Office 365, I needed to load ADO 2.x (mine was 2.5, because I know that works) first, and then I had to load the dao360.dll. Then I didn’t get errors.
I’ve noticed that with every new release of Access, Microsoft gets stricter about what the program will allow.