User-defined type not defined (Access 97) 
Author Message
 User-defined type not defined (Access 97)



Quote:

> Dim Db as Database
> Dim Rst as RecordSet

> I get the error message "Compile error: user-defined type not defined"

These belong to DAO, and Access >= 2000 defaults to not referencing DAO
(bless its little heart..)

In the VBA editor, check tools, references and check ON Microsoft Data
Access Objects (3.61). If you don't need ADO, unselect it.

Then all will be well, and all things will be well.

Tim F



Mon, 18 Apr 2005 03:26:35 GMT  
 User-defined type not defined (Access 97)

Quote:

>I have a module where I am trying to use the Database and Recordset
>objects. But when I type

>Dim Db as Database
>Dim Rst as RecordSet

>I get the error message "Compile error: user-defined type not defined"

>As I'm basing my code on stuff I found in Litwin, Getz and Gilbert I'm
>puzzled as to why I'm getting the error message. (However I am a complete
>newbie to Access...!) I use Access 97 on Windows 2000 SP3.

You'll have to add a reference to the DAO library (tools
menus while viewing any code module).  From your question, I
think it's safe to assume that you're not intending to use
the ADO library, so uncheck that reference.

--
Marsh
MVP [MS Access]



Mon, 18 Apr 2005 02:34:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. User-defined type not defined (Access 2000)

2. User Control - User-defined type not defined

3. User Defined Type Not Defined

4. Compile Error: User-defined type not defined

5. Excel : User-defined type not define

6. Compile Error - User defined type not defined

7. Dim oappWD as Word.Application: User defined type not defined

8. User- Defined type not defined

9. User Define Type Not Defined

10. FileSystemObject "User Defined Type Not Defined"

11. Compile Error - User-Defined type not defined

12. "User defined type, not defined"

 

 
Powered by phpBB® Forum Software