Solved

Access won't recognize Database or QueryDef

Posted on 2001-09-17
6
265 Views
Last Modified: 2008-03-10
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....
0
Comment
Question by:joGor
[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 54

Accepted Solution

by:
nico5038 earned 50 total points
ID: 6488929
Probably:
   Dim db As dao.DATABASE
   Dim qry As dao.queryDef
will work.

Just go in the code "mode" to Tools/References to see what modules are present. Make sure at least the Microsoft DAO ... Object library is present and "checked".

Nic;o)
0
 
LVL 7

Expert Comment

by:Jonathan Kelly
ID: 6489741
yes it sounds like the ADO Library id being referenced rather than the DAO Library
0
 

Expert Comment

by:Keza
ID: 6490013
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"
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!

 

Author Comment

by:joGor
ID: 6490440
Yes it was just a reference to the DAO 3.6 that was not checked... how annoying. Thanks all!
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6490477
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)
0
 

Expert Comment

by:jrsumner
ID: 8678895
Thanks.  This helped me out as well!
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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