Why does MS Access sometimes complain about a GROUP BY or ORDER BY not being in the target list?
This message comes from the PostgreSQL backend. PostgreSQL currently requires fields in the ORDER BY and GROUP BY clauses to be included in the target list. However, this restriction has been lifted in PostgreSQL 6.4+ Older versions of the Microsoft Jet Database Engine, that Access is built on, has some problems that can cause this to occur. Access will insist on throwing in an order by clause in a join query, even if you are not sorting on anything. Even with PostgreSQL 6.4+, the query may no longer error out, BUT it would be sorted in a way you may not want, and there would be no way to change it. To fix this problem, you need to update the Jet database engine to version 3.51. It is available at no charge from Microsoft. Click here to download the latest Jet Engine from the Microsoft support site.