I have used date functions with this to get other working queries however this time I cant seem to get it right. I had it up to asking me for a date and it will return the correct data, however thats not what I want.
I want it to look up the customers info and email and create the report so I can use that report to send an automated email to that customer the following day.
ie.. the customer completes a reccord today. tomorrow morning my report runs pulling only the previous days reccords.
Trouble is the Date () function to get the system date is something I cant seem to get right. I tried with brackets, parameters, etc... no luck errors every time. I think of it like this:
SELECT Customer.FNAME, Customer.LNAME, Customer.LAST_VISIT, Customer.EMAIL
FROM Customer
WHERE Customer.LAST_VISIT= Date()-1
and it works up until the Date() then errors and gives me "Undefined Function "Date" in expression" error message. What am I doing wrong with this seemingly simple Query?
I also tried defining the database values as dates, no difference no matter how I changed the query around Date.