DesertTrip
Technical User
Scriver was extremely patient last month and taught me alot about grouping like records from one field of a query. I did great on my own for the next 5 queries that required this action. But now, I am stumped with my latest one. It keeps telling me that I am having a Syntax error and when I close the error window, the word "BY" is highlighted and flashing.
The error states: Syntax Error (missing operator) in query expression 'GROUP BY Format$([tblCaseData].[Date],"m/yy"
'
Why? What am I missing in this SQL statement? I have compared it to my working statements in the other queries and can't find any formatting differences. Was I just lucky the others worked?
My Mess:
SELECT DISTINCTROW Format$([tblCaseData].[Date],"m/yy"
AS DateByMonth, [tblCaseData]!
The error states: Syntax Error (missing operator) in query expression 'GROUP BY Format$([tblCaseData].[Date],"m/yy"
Why? What am I missing in this SQL statement? I have compared it to my working statements in the other queries and can't find any formatting differences. Was I just lucky the others worked?
My Mess:
SELECT DISTINCTROW Format$([tblCaseData].[Date],"m/yy"
Code:
AS Activity, tblCaseData.EmployeeNumber, Count(*) AS Count,
Sum([tblCaseData]![OPAmt]) AS OPAmt,
Sum([tblCaseData]![OIAmt]) AS OIAmt,
GROUP BY Format$([tblCaseData].[Date],"m/yy"), [tblCaseData]![Code],
HAVING (((Format$([tblCaseData].[Date],"m/yy"))=[Enter MonthYear as m/yy]) AND ((tblCaseData.EmployeeNumber)=[Enter Employee Number]));
[/color]