I am being really thick - again!

fat controller

Slightly round the bend..
Local time
Today, 22:20
Joined
Apr 14, 2011
Messages
758
I am wanting a query to return only records that have a date that is between today's date and 90 days in the future, but I am getting the criteria wrong. Currently I have <=Date()+90 - what am I missing?
 
Aye, that's it! I did say I was being thick :o

Thank you
 
I am back at this one, because it is not working and I cannot get my head around it.

The criteria is on an expression (DueDate: DateAdd("yyyy",1,[RiskAssessmentDate]), but it is returning records where the date calculated is way before or way after the 90 days I am wanting.

I have tried chaning the Date() for Now() which makes no difference - it's got me stumped :confused:
 
Are you are looking for RiskAssessmentDates between now and 90 days ahead?
 
Solved it - I had to have two queries - the first to calculate the expression, and then another querying the first with the criteria.
 
I've just tried this to return nothing and it worked?
The reason it will return nothing is the original dates are 02/05/17 to 05/05/17
Code:
SELECT CR.Date, DateAdd("m",1,[Date]) AS Expr1
FROM CR
WHERE (((DateAdd("m",1,[Date])) Between Date() And Date()+10));
 

Users who are viewing this thread

Back
Top Bottom