I have this sql statement below which has recently stopped working and is only returning 14 rows instead of 42 rows. Im completely baffled by it. So any ideas would be greatly appeciated?
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 [Complaints Table].[Type of Complaint], Format([Date],""mm""
;"
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 [Complaints Table].[Type of Complaint], Format([Date],""mm""