Running on Access 2010 and Windows on 64bit.
Using 32bit APIs with PtrSafe.
Both older and newer References
Microsoft ActiveX Data Objects 6.0 Library
Microsoft ADO Ext. 6.0 for DDL and Sercurity
Or
Microsoft ActiveX Data Objects 2.8 Library
Microsoft ADO Ext. 2.8 for DDL and Sercurity
No luck with both.
Here the problem.
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String
Dim I as Integer
Set cn = CurrentProject.Connection
Set rs = New ADODB.Recordset
strSQL = “Select * From MyTable Where SomeID = 1”
Rs.open “strSQL”, cn, adOpenStatic,adLockOptimistic
For I = 0 To rs.RecordCount
So on……
There are two problems here. 1 is “Set rs = New ADODB.Recordset and 2 is rs.RecordCount
“rs.RecordCount” shows the error
Compiled error: Type mismatch
I tried changing it to “Set rs = ADODB.Recordset”, errored with a message
Compiled error: Method or data member not found.
The other problem was VBA pointed the error at “+” on the line lngCount = rs.RecordCount + 1 in another form. But I believed it’s due to “rs.RecordCount” error as the
“Type mismatch”.
Has anyone got clues? I’m thinking that ADO is only working in 32bit version only. I have yet to test it on a 32bit system with 32bit Access 2010 or Microsoft Access Team missing something here. (unless I can
set it up)
Please Mark As Answered if it solved the problem.