I have a VBA query which errors saying "Missing operator in query expression 'Format([Date],""mm""
AS Month'. Any ideas what is missing as I keep trying different things and im not getting anywhere?
Thanks in advance
Vicky
strSQL = "SELECT Count([Complaints Table].Counter) AS CountOfCounter, [Complaints Table].[Type of Complaint], Format([Date],""mm""
AS Month" & _
" FROM [Complaints Table]" & _
" WHERE ((([Complaints Table].Date) Between " & _
" [Forms]![Print Request between dates]![sdate]" & _
" And [Forms]![Print Request between dates]![edate])" & _
" AND (([Complaints Table].[Attributable to Company])=""epco""
)" & _
" GROUP BY [Complaints Table].[Type of Complaint], Format([Date],""mm""
" & _
" ORDER BY [Type of Complaint], Format([Date],""mm""
As Month; "
Thanks in advance
Vicky
strSQL = "SELECT Count([Complaints Table].Counter) AS CountOfCounter, [Complaints Table].[Type of Complaint], Format([Date],""mm""
" FROM [Complaints Table]" & _
" WHERE ((([Complaints Table].Date) Between " & _
" [Forms]![Print Request between dates]![sdate]" & _
" And [Forms]![Print Request between dates]![edate])" & _
" AND (([Complaints Table].[Attributable to Company])=""epco""
" GROUP BY [Complaints Table].[Type of Complaint], Format([Date],""mm""
" ORDER BY [Type of Complaint], Format([Date],""mm""