I am trying to return the recordcount from a query using ADO. The query is run with ADO using the connection object and the syntax is ..
"SELECT distinct tblTable.txtField FROM qryQuery ORDER BY tblTable.txtField".
Why is it that when I run this query, the recordcount is -1? In fact, there are many records returned.
Also, I have added a simple WHERE clause to the query:
"SELECT distinct tblTable.txtField FROM qryQuery WHERE tblTable.txtField like "*value*" ORDER BY tblTable.txtField",
The result of the above is always no records. However, if I run this query directly in an Access query (instead of using ADO), I do get the results I have asked for.
Is there anything I am doing here that is strange?