Link to home
Start Free TrialLog in
Avatar of joGor
joGor

asked on

Access won't recognize Database or QueryDef

Greetings,

I have a two simple lines of code

Sub thing()
    Dim db As DATABASE
    Dim qry As queryDef
   
End Sub

Access2000 doesn't recognize The Database object or the QueryDef object.

I get the error: "User-defined type not defined" Is there a certain library or option that I don't have selected? Very confused and frustrated....
ASKER CERTIFIED SOLUTION
Avatar of nico5038
nico5038
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jonathan Kelly
yes it sounds like the ADO Library id being referenced rather than the DAO Library
Avatar of Keza
Keza

yes i have come across a simiar problem when converting an old version of access to the new version, the library in 2000 don't seem to recognise "QueryDef"
Avatar of joGor

ASKER

Yes it was just a reference to the DAO 3.6 that was not checked... how annoying. Thanks all!
It will even be more annoying when you move your application to a machine with DAO 3.5
In such a case you'll need to change the reference, otherwise the strangest error's can occur...

But glad I could help, success with your aplication.

Nic;o)
Thanks.  This helped me out as well!