C
CR
Hi,
I have the follow query:
SELECT Schools.SchoolName, BackupTracking.ServerName,
SchoolServers.ServerID, BackupTracking.BackupStatus,
BackupTracking.Date
FROM Schools INNER JOIN (SchoolServers LEFT JOIN (SELECT
BackupTracking.* FROM BackupTracking
WHERE BackupTracking.Date BETWEEN [Forms]![DateRange]!
[SpecificFromDate] & " 18:00:00" AND dateadd("d",1,[Forms]![DateRange]!
[SpecificToDate]) & " 17:59:59") AS BackupTracking ON
SchoolServers.ServerID = BackupTracking.ServerID) ON Schools.SchoolID
= SchoolServers.SchoolID
WHERE (((Schools.OptionA)=Yes))
ORDER BY Schools.SchoolName;
which works fine, however periodically I can not run the query nor
open it in design view as I get an error saying "Syntax Error in From
Clause". When this happens I have to create a new query, paste in the
code and delete the old and it works again. I have noticed that if I
save it and then open it again in design view the code has changed.
Access 2003 puts in [ instead of the ( after the INNER Join and a ].
instead of ) before the AS.
So why does access change the code which wont then save unless I
change it back and why does it periodically stop working?
Is the code wrong?
I have the follow query:
SELECT Schools.SchoolName, BackupTracking.ServerName,
SchoolServers.ServerID, BackupTracking.BackupStatus,
BackupTracking.Date
FROM Schools INNER JOIN (SchoolServers LEFT JOIN (SELECT
BackupTracking.* FROM BackupTracking
WHERE BackupTracking.Date BETWEEN [Forms]![DateRange]!
[SpecificFromDate] & " 18:00:00" AND dateadd("d",1,[Forms]![DateRange]!
[SpecificToDate]) & " 17:59:59") AS BackupTracking ON
SchoolServers.ServerID = BackupTracking.ServerID) ON Schools.SchoolID
= SchoolServers.SchoolID
WHERE (((Schools.OptionA)=Yes))
ORDER BY Schools.SchoolName;
which works fine, however periodically I can not run the query nor
open it in design view as I get an error saying "Syntax Error in From
Clause". When this happens I have to create a new query, paste in the
code and delete the old and it works again. I have noticed that if I
save it and then open it again in design view the code has changed.
Access 2003 puts in [ instead of the ( after the INNER Join and a ].
instead of ) before the AS.
So why does access change the code which wont then save unless I
change it back and why does it periodically stop working?
Is the code wrong?