Sorry but I have got myself in a knot!:banghead:
I have the table tblInvoice which contains the fields CustomerId and InvoiceDate
I want to create a query that returns all customers who have not been invoiced in the last 3 months.
I have tried:
but this returns records for the current month which is incorrect!
How do I do this?
I have the table tblInvoice which contains the fields CustomerId and InvoiceDate
I want to create a query that returns all customers who have not been invoiced in the last 3 months.
I have tried:
Code:
SELECT tblInvoice.CustomerId, Last(tblInvoice.InvoiceDate) AS LastOfInvoiceDate
FROM tblInvoice
GROUP BY tblInvoice.CustomerId
HAVING (((Last(tblInvoice.InvoiceDate))<=DateAdd("m",3,Date())))
ORDER BY Last(tblInvoice.InvoiceDate) DESC;
How do I do this?