Solved

Doesn't recognize the ADODB variable types

Posted on 2007-03-29
6
435 Views
Last Modified: 2008-03-06
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.
0
Comment
Question by:tiggermt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18820635
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?
J
0
 
LVL 61

Accepted Solution

by:
mbizup earned 125 total points
ID: 18820643
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
0
 
LVL 67

Assisted Solution

by:sirbounty
sirbounty earned 125 total points
ID: 18820648
Check Project/References - make sure you've still got reference to Microsoft ActiveX Data Objects 2.x Library
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75
ID: 18820665
in case the References suggestions does not fix this ... can you post all the relevant code?

mx
0
 

Author Comment

by:tiggermt
ID: 18820738
Thanks! It was the references.
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18820743
Happy to help
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question