Dim tDef As tabledef

J

Jim Bunton

Dim tDef As tabledef
gives error on compile "User-Defined Type not Defined"

but this type is included in the help files

Why is this please
 
K

Ken Snell [MVP]

TableDef is an object in the DAO library. ACCESS 2000 and 2002 do not have a
reference set to this library by default; ACCESS 97 and 2003 do.

While in VBE, click Tools | References -- set a reference to the DAO
library.

Then, I recommend you fully qualify the reference in your Dim statement just
so that it's clear:

Dim tDef As DAO.TableDef
 
N

Nikolay Vyglazov

Hi,

Put the reference in your project to MS DAO (or ADO) object.

Regards,

Nikolay
 
J

Jim Bunton

Thanks Ken works fine

Jim B

Ken Snell said:
TableDef is an object in the DAO library. ACCESS 2000 and 2002 do not have a
reference set to this library by default; ACCESS 97 and 2003 do.

While in VBE, click Tools | References -- set a reference to the DAO
library.

Then, I recommend you fully qualify the reference in your Dim statement just
so that it's clear:

Dim tDef As DAO.TableDef
 
Top