Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User-defined type is not defined 1

Status
Not open for further replies.

Keph

Technical User
Oct 15, 2002
16
0
0
CA
Whenever I try to define something as QueryDef (i.e. Dim MyQuery As QueryDef), it gives an error message saying "User-defined type is not defined". I'm only at a beginner's level with VB, so it's confusing when examples right out of help files give errors on the second line! I've tried defining things like this in Sub's and in Function's. Any help would be greatly appreciated.
 
I think "QueryDef" is a DAO object, but not included in the ADO object collection. Ms. A 2K (and later) sort of assume ADO, and thus NO NOT include the DAO object library by default. To use the "QueryDef" object, you would need to include the DAO 3.6 Object library and include the "DAO." predecessor as a qualifier for the database/connection/recordset ...

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks a lot, it worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top