SELECT Format([Order Recieved],"mmmm yyyy") AS [Month], Sum([Sales Orders].Value) AS SumOfValue, Count([Sales Orders].[G Number]) AS [CountOfG Number]
FROM [Sales Orders]
GROUP BY Format([Order Recieved],"mmmm yyyy")
HAVING (((Format([Order Recieved],"mmmm yyyy"))=DateAdd("m",-1,Format(Now(),"mmmm yyyy"))));
Hi, im using the above sql query to try and get a total for sales last month and how many sales.
I can get sales THIS month without any probs, but last month just returns blank records
FROM [Sales Orders]
GROUP BY Format([Order Recieved],"mmmm yyyy")
HAVING (((Format([Order Recieved],"mmmm yyyy"))=DateAdd("m",-1,Format(Now(),"mmmm yyyy"))));
Hi, im using the above sql query to try and get a total for sales last month and how many sales.
I can get sales THIS month without any probs, but last month just returns blank records