Compile error: User-defined Type Not Defined

10-23-2004, 04:01 PM
OK this same code was working for me before but not I have created a New project and inserted the code in MDI form I get this error

Compile error: User-defined Type Not Defined

and it highlights this section of the code

New ADODB.Connection

code is:

Set cnn = New ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\data.mdb" & ";Persist Security Info=False"

'This will set rs as Access recordset(Table)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

10-23-2004, 04:21 PM
I just figuered it out didnt declear variable!

Public cnn As ADODB.Connection

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum