Hi I'm just starting out using ADO in access but I can't get the code to compile in Access 97. The first part of the code is:
What happens when I try to compile the module is I get the following message: "User-defined type not defined" and it highlights the line with "Dim cnn As New ADODB.Connection" in it
Does that mean I have not got ADO installed correctly
Can anyone help me out?
Code:
Option Compare Database
Option Explicit
Private Sub Command0_Click()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim curdb As Database
Set curdb = CurrentDb
Set CurConn = New ADODB.Connection
With CurConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source= " & curdb.Name
.Open
End With
What happens when I try to compile the module is I get the following message: "User-defined type not defined" and it highlights the line with "Dim cnn As New ADODB.Connection" in it
Does that mean I have not got ADO installed correctly
Can anyone help me out?