You can specify different types of recordset returned by provider (KEYSET, FORWARONLY, etc). Some of them always report -1 record count because of there nature.
I'm not sure why you cannot reference recordset fields by name.
What do you get when run following
? oRs.Fields(0).Name
? oRs.Fields(oRs.Fields(0).Name).Value
>The query works now. I had to remove semicolons and linebreaks, and tweak it a bit more, but in the end it worked, even with two levels of subquery, union and all the joins.
>
>The remaining trouble is that the recordset reports having -1 records, and the fields collection doesn't retrieve any fields by name. The first I can ignore, the other can be accessed by number in a loop, and then I get the values and the usual .movefirst/.movenext does hit the .eof eventually. Anyway, the point is that I get a query which works and can be used from Access, which was the request.
--sb--