I have this code:
I just put the "CurrentProject.Connection" part in there to see if it would work. It wasn't working with my connection string, either. With "CurrentProject.Connection", it still doesn't work.
In my References, I have "Microsoft ActiveX Data Objects 2.7 Library" selected, and there isn't any apparent problem there.
when I run this code in break mode (or any mode), when it gets to the cdADO.Open line, I get the: Error #429. ActiveX can't create object..
I am clueless at this point. Can you help?!!
Thank you!!
-Mike
Code:
Sub miketest()
Dim cnADO As New ADODB.Connection, rstADO As New ADODB.Recordset, sSQL As String, fldADO As ADODB.Field
cnADO.Open CurrentProject.Connection
sSQL = "select count(0) from u_lead_tracking"
rstADO.Open sSQL, cnADO
MsgBox rstADO.Fields(0)
rstADO.Close
Set rstADO = Nothing
cnADO.Close
Set cnADO = Nothing
End Sub
In my References, I have "Microsoft ActiveX Data Objects 2.7 Library" selected, and there isn't any apparent problem there.
when I run this code in break mode (or any mode), when it gets to the cdADO.Open line, I get the: Error #429. ActiveX can't create object..
I am clueless at this point. Can you help?!!
Thank you!!
-Mike