0
votes

i keep getting the below error when running this SQL code in an access query. Any idea why?

Error: Syntax error (missing operator) in query expression ' Status Date'

Code:

FROM [Owner Training Report]
WHERE ((([Owner Training Report].[Status Date])>DateAdd("m",12,Date())) AND (([Owner Training Report].[Reporting Basic Status])="Completed"));
2
Please show full SQL as error can be due to another part of query. - Parfait

2 Answers

1
votes

You may have Null values, so try:

WHERE (Nz([Status Date],Date()) > DateAdd("m",12,Date())) AND ([Reporting Basic Status] = "Completed");
0
votes

Try this (I cannot be 100% sure as I don't know what is your full query):

FROM [Owner Training Report]
WHERE ((([Owner Training Report].[Status Date])>DateAdd('m',12,Date())) AND (([Owner Training Report].[Reporting Basic Status])='Completed'));

I basically changed " to '