UNION ALL query works fine - but "too complex" for a report's record source?
Hi there,
have been using the following SQL as record source for a report while still in Access 2003. Since moving to Access 2010 the report won't accept the SQL as a record source anymore - even though the SQL works as a stand along query: "Query is too complex".
I figured out that Access doesn't like the "ALL" part. Omitting ALL eliminates the problem. But creates another one for me.
SELECT eurnet AS EurOut, 0 AS EurIn FROM tblaccount WHERE isout AND project=245
UNION ALL SELECT 0 AS EurOut, csng(nz(eurnet,0)) AS EurIn FROM tblaccount WHERE not isout AND project=245
UNION ALL SELECT csng(nz(flowout,0)), csng(nz(flowin,0)) FROM tblaccountmisc WHERE 1 AND project=245;
How come I can't use a UNION ALL query as record source? Thanks for any clues!
Marcus
Running Access 2010 on Windows 7, mdb front-end with a MySQL back-end connected via ODBC connector.
Hi there,
have been using the following SQL as record source for a report while still in Access 2003. Since moving to Access 2010 the report won't accept the SQL as a record source anymore - even though the SQL works as a stand along query: "Query is too complex".
I figured out that Access doesn't like the "ALL" part. Omitting ALL eliminates the problem. But creates another one for me.
SELECT eurnet AS EurOut, 0 AS EurIn FROM tblaccount WHERE isout AND project=245
UNION ALL SELECT 0 AS EurOut, csng(nz(eurnet,0)) AS EurIn FROM tblaccount WHERE not isout AND project=245
UNION ALL SELECT csng(nz(flowout,0)), csng(nz(flowin,0)) FROM tblaccountmisc WHERE 1 AND project=245;
How come I can't use a UNION ALL query as record source? Thanks for any clues!
Marcus
Running Access 2010 on Windows 7, mdb front-end with a MySQL back-end connected via ODBC connector.