Error In Loading DLL And DAO DLL Download

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

https://vbahowto.com/support/dao/DAO350.DLL
https://vbahowto.com/support/dao/dao360.dll

In your virus software prevents you from downloading this dll you will need to download these, and rename the extension to “dll”.

https://vbahowto.com/support/dao/DAO350.DLO
https://vbahowto.com/support/dao/dao360.dlo

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.

BUT!!!

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.

Note:
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.




By the way, if you got or are getting value from the VBA information, please give me a tip, thanks!


These posts may help answer your question too...

How To Parse A Flat File In Excel VBA

In another post I demonstrated how to access a file on your computer using the MS Office Library. Here it is if you don’t know what I’m talking about. In this post, I am going to show you how to access the file and load it into your spreadsheet. I will do the same thing […]

How do I handle errors in Access VBA code?

I am going to give you the answer to “How do I handle errors in Access VBA code?” In my opinion there are 2 ways to handle errors: 1. Avoid the potential for an error to occur. 2. Handle the error in your code. Number 1 – If you have a control on your form […]

Find Error Line Number in VBA With Erl

In this post you are going to find out a way of handling errors in your code with the Erl function. Erl displays the last label before the error Another alternative error handling solution is using labels at each point in long procedure. Here we get a random error: Here is the code behind the […]

VBA Error Handling PT2

In this VBA Error Handling set I’ll talk about using the error object Here is a chart referencing the Error object’s properties for you to reference: Property Description Number The number of the error. Description The description of the error. Source The name of the object or application that originally generated the error. …CODE EXAMPLE […]

Previous Post

How To Use VBA To Extract Outlook Emails To Access Table

Next Post

What Is The Access VBA NZ Function