K
Keith
I have code that ran fine in Access 2000, but it fails in Access 2003.
The code changes the .RecordSource property of a report to a different
SQL string that contains a couple of subqueries. I can cut and paste
the string into a new query window and it runs fine. I can paste it
into the RecordSource field in the report's property window, then
click the builder button and execute the query from there with no
problem. But if I attempt to open the report I get a 'Syntax error in
From clause' error because when saving the report, Access replaced the
parentheses surrounding my subqueries with square brackets. So, "LEFT
JOIN (SELECT yada yada yada) d ON ... " becomes "LEFT JOIN [SELECT
yada yada yada] AS d ON ... " and that doesn't work. Any ideas?
TYIA
Keith Ketchum
The code changes the .RecordSource property of a report to a different
SQL string that contains a couple of subqueries. I can cut and paste
the string into a new query window and it runs fine. I can paste it
into the RecordSource field in the report's property window, then
click the builder button and execute the query from there with no
problem. But if I attempt to open the report I get a 'Syntax error in
From clause' error because when saving the report, Access replaced the
parentheses surrounding my subqueries with square brackets. So, "LEFT
JOIN (SELECT yada yada yada) d ON ... " becomes "LEFT JOIN [SELECT
yada yada yada] AS d ON ... " and that doesn't work. Any ideas?
TYIA
Keith Ketchum