I am still getting one more error. At the (adoRecordset.OpenRecordset) vb is telling me that method or data member not found. How can I fix this.
Private Sub Form_Load()
Dim Treespraying As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Set Treespraying = New ADODB.Connection
Treespraying.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents\TreeSpraying.mdb"
Set adoRecordset = New ADODB.Recordset
adoRecordset.OpenRecordset "Select CustomerLastName,
CustomerFirstName", Treespraying, adOpenStatic, adLockOptimistic
End Sub
Private Sub Form_Load()
Dim Treespraying As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Set Treespraying = New ADODB.Connection
Treespraying.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents\TreeSpraying.mdb"
Set adoRecordset = New ADODB.Recordset
adoRecordset.OpenRecordset "Select CustomerLastName,
CustomerFirstName", Treespraying, adOpenStatic, adLockOptimistic
End Sub