sillyman
10-23-2004, 03: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"
cnn.Open
'This will set rs as Access recordset(Table)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
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"
cnn.Open
'This will set rs as Access recordset(Table)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset