Here is what I need I am running a report the report shows all the invoices between two dates and total all the subtotals of the invoices and the taxes on the invoices. Here is the code.
strSQL= "SELECT Sum(tblinvoices.fldsubtotal) As fldsubtotal, Sum(tblinvoices.fldpst) As fldpst, tblinvoices.flddate FROM tblinvoices GROUP BY tblinvoices.flddate HAVING tblinvoices.flddate BETWEEN #" & strStartDate & "# AND #" & strEndDate & "#"
But it only gives me one of the invoices the GROUP BY makes a mess of it but I need the date as it is part of the record filter. The SUM works but I can't get the right totals without the date.