ccess 2010
I have an update query where I want to find anyone whose MemberStatus is 1 AND who enquired more than 180 days before today, then update their status to 4. The date field -DateEnquired - is set to Short Date. The Criteria is <Date()-180. This returns an error message.
What am I missing? UPDATE-BASED-ON-DATE.JPG
Microsoft Access
Last Comment
msmerry
8/22/2022 - Mon
Kelvin Sparks
Use the DATEADD function
<DATEADD("d", -180,DATE())
Kelvin
msmerry
ASKER
Thanks Kelvin,
Tried that but it doesn't work.
I would guess that it is looking for a specific date - exactly 180 days before today - in other words, take 180 days off today; if there is no such entry, then it returns nothing.
What I want is Find all dates greater than 180 days before today - somewhere it requires <. or is it >?
Aileen
Kelvin Sparks
Do you mean within the last 180 days or more than 180 days ago?
<DATEADD("d", -180,DATE())
Kelvin