Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Why would I get  Error - user defined type not defined on Dim rs As New ADODB.Recordset?

Posted on 2009-02-17
3
Medium Priority
?
284 Views
Last Modified: 2012-05-06
I am converting a working 2003 db to 2007.

I am getting a compile error Statement shown below.

This code is straight from examples - so I am clueless as to why I am getting this error.

IS there some library that I need to add, or option that must to turned on for this to work?

Any help would be greatly appreciated.
Dim rstLogs  As New ADODB.Recordset
 
ERROR BOX DISPLAYS:  Compile Error
                                         User-Defined type not defined

Open in new window

0
Comment
Question by:nancython
  • 2
3 Comments
 
LVL 75
ID: 23663961
in the vba editor ...

Tools>>References ...

Is there a Reference set to ADO ?

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 23663974
It would show as

Microsoft ActiveX Data Objects 2.5 Library.

If not ... Browser to this reference and check it off.

mx
0
 

Author Closing Comment

by:nancython
ID: 31547992
Thanks so much!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

578 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