Compile Error: User-defined type not defined

W

wnfisba

We added a Visual Basic Module1 to an Access Database that uses both Access
Tables and SQL Server Tables. Within the first executable function in VB
Module1, we are getting the following error message...

Compile error: User-defined type not defined

The statement its attempting to execute is...

Dim MyDatabase As DAO.Database

I am pretty new to Access and accessing SQL Server through access, although
I don't think SQL Server has anything to do with this.

Any information or help you could provide would be GREATLY appreciated!

Thanks!

wnfisba
 
D

Dave Patrick

From any module Tools|References and make sure you have DAO 3.6 checked.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| We added a Visual Basic Module1 to an Access Database that uses both
Access
| Tables and SQL Server Tables. Within the first executable function in VB
| Module1, we are getting the following error message...
|
| Compile error: User-defined type not defined
|
| The statement its attempting to execute is...
|
| Dim MyDatabase As DAO.Database
|
| I am pretty new to Access and accessing SQL Server through access,
although
| I don't think SQL Server has anything to do with this.
|
| Any information or help you could provide would be GREATLY appreciated!
|
| Thanks!
|
| wnfisba
 
Top