P
Peter Facey
I have the same problem mentioned in 2005 in this thread:
https://www.microsoft.com/office/co...fc-b776-ff82b9e99d87&sloc=en-us&wa=wsignin1.0
It seems that when one closes a perfectly legal SQL query that works ok,
Access rewrites it into a form which Access will itself reject the next time
the query is opened and closed in design view.
For example, this query
SELECT COUNT(*)
FROM (SELECT DISTINCT Addr1,Addr2,Addr3,Addr4,Addr5,Addr6
FROM Voters INNER JOIN BartonFarmPostcodes AS BF ON
[Voters].[Postcode]=BF.Postcode) AS QQ;
will be rewritten as
SELECT COUNT(*)
FROM [SELECT DISTINCT Addr1,Addr2,Addr3,Addr4,Addr5,Addr6
FROM Voters INNER JOIN BartonFarmPostcodes AS BF ON
[Voters].[Postcode]=BF.Postcode]. AS QQ;
It will continue to work. But if you open it again in design view, make a
trivial change so that Access needs to reprocess it, and then close it, you
get the error message SYNTAX ERROR IN FROM CLAUSE with a blinking cursor on
the equals sign.
One can solve this by changing the square brakets back to round and deleting
the dot. However, this inability to resave queries interferes with the View
Object Dependencies feature, because Access cannot rebuild the dependency
information and says "could not enable name Autocorrect for one or more
objects because Access could not open or save the objects".
This incorrect rewriting of SQL queries is a long standing bug in
Access2003. Is there a fix for it? Mine is SP3.
https://www.microsoft.com/office/co...fc-b776-ff82b9e99d87&sloc=en-us&wa=wsignin1.0
It seems that when one closes a perfectly legal SQL query that works ok,
Access rewrites it into a form which Access will itself reject the next time
the query is opened and closed in design view.
For example, this query
SELECT COUNT(*)
FROM (SELECT DISTINCT Addr1,Addr2,Addr3,Addr4,Addr5,Addr6
FROM Voters INNER JOIN BartonFarmPostcodes AS BF ON
[Voters].[Postcode]=BF.Postcode) AS QQ;
will be rewritten as
SELECT COUNT(*)
FROM [SELECT DISTINCT Addr1,Addr2,Addr3,Addr4,Addr5,Addr6
FROM Voters INNER JOIN BartonFarmPostcodes AS BF ON
[Voters].[Postcode]=BF.Postcode]. AS QQ;
It will continue to work. But if you open it again in design view, make a
trivial change so that Access needs to reprocess it, and then close it, you
get the error message SYNTAX ERROR IN FROM CLAUSE with a blinking cursor on
the equals sign.
One can solve this by changing the square brakets back to round and deleting
the dot. However, this inability to resave queries interferes with the View
Object Dependencies feature, because Access cannot rebuild the dependency
information and says "could not enable name Autocorrect for one or more
objects because Access could not open or save the objects".
This incorrect rewriting of SQL queries is a long standing bug in
Access2003. Is there a fix for it? Mine is SP3.