Doesn't recognize the ADODB variable types

I am getting the following Visual Basic error in an Access Database (mdb):

Compile error:
User-defined type not defined

The variable that it doesn't recognize is "New ADODB.Recordset"

This database has worked just fine without any issues. Now it doesn't recognize the ADODB variable types.
Who is Participating?
mbizupConnect With a Mentor Commented:
Make sure that you have your references set up properly:
From the VBA Editor:

Tools -> References
Make sure that
Microsoft Activex Data objects Librery v x.x   is checked

If it is checked and labelled MISSING, uncheck it and select the right version from the list.
Click OK to save and exit
What's changed in your environment? This usually indicates that an update or some other upgrade has either moved or overwritten DLLs on the offending machine. Have you opened the DB up and checked for any missing references?
sirbountyConnect With a Mentor Commented:
Check Project/References - make sure you've still got reference to Microsoft ActiveX Data Objects 2.x Library
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
in case the References suggestions does not fix this ... can you post all the relevant code?

tiggermtAuthor Commented:
Thanks! It was the references.
Happy to help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.