Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile Error

Status
Not open for further replies.

glove

Technical User
Aug 24, 2000
42
US
I'm using the Visual Basic 6.0

When I use the following code:
Private db as database

I get the error:
Compile Error: User-defined type not defined

I also get the error from the code:
Set DB = OpenDatabase(App.Path & "\mydb.mdb")

Does anyone know why I get this error?
Thanks.
 
Goto Project --> References and then select Microsoft DAO 3.6 Object Library if you have it. If not, select the 3.51 Object Library. If you don't have that one, select the 2.5/3.5 Compatability Library. If you're developing a new application I recommend the use of ADO instead. That option would be Microsoft ActiveX Data Object 2.5 Library.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top