Database Object Not Defined

StephenS

Registered User.
Local time
Today, 16:53
Joined
Mar 24, 2000
Messages
31
Recently upgrated to 2000 and started a new project. When trying to dimension a variable as a database object, the message, "User-defined type not defined", appeared. It occurred on this simple code:

Dim dbs As Database

It is referring to the word "Database". As I typed the Dim statement, I noticed the drop-down did not list "database" as a possible object type. Strange. I have used this code before. A previous application done in Access 97 lists "Database" as an object and runs with no problem.

What causes this and how do I get "database" as an object back?

StephenS
 
Welcome to the frustration of VB Programmers... The references. In Order to gain the DAO Database objects you will need to add this reference to your project:

Microsoft DAO 3.6 Object Library

Hope this helps
 
Excellent!! I now have a drop down list that includes a "database" object. Thanks, Travis, for a successful fix that was also simple.

StephenS
 

Users who are viewing this thread

Back
Top Bottom