User Defined Type Not Defined 
Author Message
 User Defined Type Not Defined

Hi;

This is probably another really stupid question and I'm
going to feel really stupid AGAIN!  Anyway, I got some
code that re-links my database FE and BE.  When I compile
it I get these messages:

Dim dbs As Database
"User defined type not defined"

Dim tdf As TableDef
"User defined type not defined"

I'm developing in Access 2002 using Windows and Office
XP.  Any help will be greatly appreciated.

Thanks,
Dan



Wed, 21 Sep 2005 06:31:33 GMT  
 User Defined Type Not Defined
Hi Dan,

Missing a reference to DAO 3.6?   Or, maybe you've got references to both
DAO and ADO and you might want to dim your database and tabledef as:

Dim dbs as DAO.Database
Dim tdf as DAO.TableDef

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX


Quote:
> Hi;

> This is probably another really stupid question and I'm
> going to feel really stupid AGAIN!  Anyway, I got some
> code that re-links my database FE and BE.  When I compile
> it I get these messages:

> Dim dbs As Database
> "User defined type not defined"

> Dim tdf As TableDef
> "User defined type not defined"

> I'm developing in Access 2002 using Windows and Office
> XP.  Any help will be greatly appreciated.

> Thanks,
> Dan



Wed, 21 Sep 2005 07:29:07 GMT  
 User Defined Type Not Defined
Hi;

I have some code that is trying to reconnect my frontend
database to the backend.  I put the code in a module in
the front end and tried to compile it.  The compiler is
flagging these statements:

Dim dbs As Database
"User Defined Type Not Defined"

Dim tdf As TableDef
"User Defined Type Not Defined"

Can anyone give me a clue here?

Thanks,
Dan



Wed, 21 Sep 2005 13:45:06 GMT  
 User Defined Type Not Defined
Thanks for the quick reply Cheryl;

I tried it:
Dim dbs as DAO.Database
Dim dbs as DAO.TableDef

I still get the same message both places.  I hope you can
think of something else.

Thanks,
Dan

Quote:
>-----Original Message-----
>Hi Dan,

>Missing a reference to DAO 3.6?   Or, maybe you've got
references to both
>DAO and ADO and you might want to dim your database and
tabledef as:

>Dim dbs as DAO.Database
>Dim tdf as DAO.TableDef

>hth,
>--
>Cheryl Fischer
>Law/Sys Associates
>Houston, TX



>> Hi;

>> This is probably another really stupid question and I'm
>> going to feel really stupid AGAIN!  Anyway, I got some
>> code that re-links my database FE and BE.  When I
compile
>> it I get these messages:

>> Dim dbs As Database
>> "User defined type not defined"

>> Dim tdf As TableDef
>> "User defined type not defined"

>> I'm developing in Access 2002 using Windows and Office
>> XP.  Any help will be greatly appreciated.

>> Thanks,
>> Dan

>.



Wed, 21 Sep 2005 15:06:40 GMT  
 User Defined Type Not Defined
Did you set a reference to DAO, though, as Cheryl suggested?

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.1
Library

If you have both references, you'll find that you'll need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rsCurr as DAO.Recordset (to guarantee an ADO recordset, you'd use
Dim rsCurr As ADODB.Recordset)

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


Quote:
> Thanks for the quick reply Cheryl;

> I tried it:
> Dim dbs as DAO.Database
> Dim dbs as DAO.TableDef

> I still get the same message both places.  I hope you can
> think of something else.

> Thanks,
> Dan
> >-----Original Message-----
> >Hi Dan,

> >Missing a reference to DAO 3.6?   Or, maybe you've got
> references to both
> >DAO and ADO and you might want to dim your database and
> tabledef as:

> >Dim dbs as DAO.Database
> >Dim tdf as DAO.TableDef

> >hth,
> >--
> >Cheryl Fischer
> >Law/Sys Associates
> >Houston, TX



> >> Hi;

> >> This is probably another really stupid question and I'm
> >> going to feel really stupid AGAIN!  Anyway, I got some
> >> code that re-links my database FE and BE.  When I
> compile
> >> it I get these messages:

> >> Dim dbs As Database
> >> "User defined type not defined"

> >> Dim tdf As TableDef
> >> "User defined type not defined"

> >> I'm developing in Access 2002 using Windows and Office
> >> XP.  Any help will be greatly appreciated.

> >> Thanks,
> >> Dan

> >.



Wed, 21 Sep 2005 20:18:59 GMT  
 User Defined Type Not Defined
Thanks Douglas;

I hadn't set the reference.  I didn't know how.  It works
now.  I'm busy re-testing everything.

Dan

Quote:
>-----Original Message-----
>Did you set a reference to DAO, though, as Cheryl
suggested?

>With any code module open, select Tools | References
from the menu bar,
>scroll through the list of available references until

you find the one for
Quote:
>Microsoft DAO 3.6 Object Library, and select it. If

you're not going to be
Quote:
>using ADO, uncheck the reference to Microsoft ActiveX
Data Objects 2.1
>Library

>If you have both references, you'll find that you'll

need to "disambiguate"
Quote:
>certain declarations, because objects with the same

names exist in the 2
Quote:
>models. For example, to ensure that you get a DAO

recordset, you'll need to
Quote:
>use Dim rsCurr as DAO.Recordset (to guarantee an ADO

recordset, you'd use
Quote:
>Dim rsCurr As ADODB.Recordset)

>The list of objects with the same names in the 2 models
is Connection,
>Error, Errors, Field, Fields, Parameter, Parameters,

Property, Properties
Quote:
>and Recordset

>--
>Doug Steele, Microsoft Access MVP
>http://I.Am/DougSteele



>> Thanks for the quick reply Cheryl;

>> I tried it:
>> Dim dbs as DAO.Database
>> Dim dbs as DAO.TableDef

>> I still get the same message both places.  I hope you
can
>> think of something else.

>> Thanks,
>> Dan
>> >-----Original Message-----
>> >Hi Dan,

>> >Missing a reference to DAO 3.6?   Or, maybe you've got
>> references to both
>> >DAO and ADO and you might want to dim your database
and
>> tabledef as:

>> >Dim dbs as DAO.Database
>> >Dim tdf as DAO.TableDef

>> >hth,
>> >--
>> >Cheryl Fischer
>> >Law/Sys Associates
>> >Houston, TX



>> >> Hi;

>> >> This is probably another really stupid question and
I'm
>> >> going to feel really stupid AGAIN!  Anyway, I got
some
>> >> code that re-links my database FE and BE.  When I
>> compile
>> >> it I get these messages:

>> >> Dim dbs As Database
>> >> "User defined type not defined"

>> >> Dim tdf As TableDef
>> >> "User defined type not defined"

>> >> I'm developing in Access 2002 using Windows and
Office
>> >> XP.  Any help will be greatly appreciated.

>> >> Thanks,
>> >> Dan

>> >.

>.



Thu, 22 Sep 2005 00:58:54 GMT  
 User Defined Type Not Defined
Thanks for suggestions will give them a try.

Mike

Quote:
>-----Original Message-----
>Hi;

>I have some code that is trying to reconnect my frontend
>database to the backend.  I put the code in a module in
>the front end and tried to compile it.  The compiler is
>flagging these statements:

>Dim dbs As Database
>"User Defined Type Not Defined"

>Dim tdf As TableDef
>"User Defined Type Not Defined"

>Can anyone give me a clue here?

>Thanks,
>Dan
>.



Thu, 22 Sep 2005 05:25:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. User Control - User-defined type not defined

2. Compile Error: User-defined type not defined

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

4. Excel : User-defined type not define

5. Compile Error - User defined type not defined

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

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