"Database - user defined type not defined"???? 
Author Message
 "Database - user defined type not defined"????

Frustrated am I!!!

Why is it that when I create a variable for Access 2000, that the
compiler gives me this error on the line:
DIM MyDB as DATABASE

This is in a module attached to a form.

Thanks - Marty



Sun, 27 Oct 2002 03:00:00 GMT  
 "Database - user defined type not defined"????
I thought it was going to be something like this.  Why it has to be added
manually and why I couldn't find any reference to it anywhere is beyond me.

Thanks - Marty

Quote:


> > Why is it that when I create a variable for Access 2000, that the
> > compiler gives me this error on the line:
> > DIM MyDB as DATABASE

>   Have you added a Project Reference to Microsoft DAO 3.6 Object
> Library?
> --
> Jim in Cleveland
> If you're writing to me, in my address
> change "REAL_Address.see.below" to "worldnet.att.net"
>  ((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))



Mon, 28 Oct 2002 03:00:00 GMT  
 "Database - user defined type not defined"????

Quote:

> Why is it that when I create a variable for Access 2000, that the
> compiler gives me this error on the line:
> DIM MyDB as DATABASE

  Have you added a Project Reference to Microsoft DAO 3.6 Object
Library?
--
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"
 ((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))


Tue, 29 Oct 2002 03:00:00 GMT  
 "Database - user defined type not defined"????
FWIW, Access 2000 uses ADO by default. As you've found, if you want to use
DAO, you have to add the reference. If you're not using ADO, you should
remove the reference to it: otherwise, you'll probably run into further
problems, since there are some objects with the same names in both models.
If you are going to use both, you'll have to "disambigulate" these
duplicated objects, like:

Dim rsADO as ADODB.Recordset
Dim rsDAO as DAO.Recordset

HTH

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


Quote:
> I thought it was going to be something like this.  Why it has to be added
> manually and why I couldn't find any reference to it anywhere is beyond
me.

> Thanks - Marty



> > > Why is it that when I create a variable for Access 2000, that the
> > > compiler gives me this error on the line:
> > > DIM MyDB as DATABASE

> >   Have you added a Project Reference to Microsoft DAO 3.6 Object
> > Library?
> > --
> > Jim in Cleveland
> > If you're writing to me, in my address
> > change "REAL_Address.see.below" to "worldnet.att.net"
> >  ((("What's so funny 'bout peace, love & understanding?" - Nick Lowe)))



Tue, 29 Oct 2002 03:00:00 GMT  
 "Database - user defined type not defined"????
Hey Marty,

You should try adding and removing a DAO to your form.
Always works for me.

Hope this helps,

Alain Van Deuren



Sun, 03 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. FileSystemObject "User Defined Type Not Defined"

2. "User defined type, not defined"

3. "User-defined type not defined"

4. db As Database = User-defined type not defined

5. User Control - User-defined type not defined

6. User Defined Type Not Defined

7. Compile Error: User-defined type not defined

8. User-defined type not defined (Access 97)

9. Excel : User-defined type not define

10. Compile Error - User defined type not defined

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

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

 

 
Powered by phpBB® Forum Software