Hello, I have a table that has a startUpDate field - then we want to add anniversary date which we use
Code:
DateAdd('yyyy',1,startUpDate)
to populate. Well now I want to have a query show me all records where anniversary is coming in the next 7 days, then a second query to show whose anniversary is in the next 30 days.
I tried this query - but I get the error
Data type mismatch in criteria expression
Code:
SELECT UserID, startUpDate, DateAdd('yyyy',1,startUpDate) AS Anniversary, Month([startUpDate]) AS AnniversaryMonth, Firstname, Lastname, Email
FROM test
WHERE (((DateAdd('yyyy',1,startUpDate))=DateAdd('yyyy',1,"startUpDate")-7))
ORDER BY startUpDate DESC;