Avatar of msmerry
msmerry
Flag for Australia asked on

More than 180 days before today's date

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

Avatar of undefined
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?

Kelvin
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Kelvin Sparks

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
msmerry

ASKER
MAny thanks - always beneficial to come to EE