This is how the query should look
SELECT VendorPayables.InvoiceDistribution, Sum(VendorPayables.InvoiceTotal) AS SumOfInvoiceTotal
FROM VendorPayables
WHERE (((VendorPayables.VendorInvoiceDate) Between #8/1/2015# And #7/31/2016#))
GROUP BY VendorPayables.InvoiceDistribution;
Looking at it in QBE view, where it says "expression" should be replaced with "where" and that will fix the problem.