>>>My point is that the whole select can be done as few derived tables, e.g.
>>>
>>>select ... from myothertable join (select ...from table1 join table2 on ... join (select something from table3 where ...) alias3 group by... etc.etc... ) X on ...
>>
>>That's what I tried first... "missing clause". It seems the OleDb is missing a few bits in the parser.
>
>Are you sure you wrote it correctly? What error are you getting?
Fields collection doesn't work by names, only by index (!). EOF is .f., recordcount is -1 (!). Other than that, I actually got a recordset.
I don't know what I fixed and how, but it seems to work now, save for these few quirks. I can live with that, I spent enough time on this.