>>>What VFP OLE DB version are you using?
>>
>>9.0.0.3504
>
>It's VFP9 SP1. What exactly is a problem with a query? Do you get an error? Can you post the actual query?
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.