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

Posted on 2009-02-17
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


                                         User-Defined type not defined

Open in new window

Question by:nancython
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    in the vba editor ...

    Tools>>References ...

    Is there a Reference set to ADO ?

    LVL 75

    Accepted Solution

    It would show as

    Microsoft ActiveX Data Objects 2.5 Library.

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


    Author Closing Comment

    Thanks so much!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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 …

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now