Query needs to add years, not days

bn1974

Registered User.
Local time
Today, 06:11
Joined
Apr 29, 2016
Messages
17
(MS Access 2010)

I am sure this should be so simple, but I can't make it work...

I am trying to calculate the next due date for an inspection using a query. The two fields I am pulling from my table are:

[LastInspectionDate] and [InspectionFrequency].

The inspection frequency is in years, but the formula I am using keeps treating it as days.

Here is what I have in my query:

Code:
NextInspectionDate: DateAdd("y",[Last_Insp_Date],[Inspection_Frequency])
Code:


So if the Inspection Frequency is 5, I need it to add 5 years to the Last Inspection Date.

Any ideas?

TIA!
 
you got it in reverse, should be:

NextInspectionDate: DateAdd("y",[Inspection_Frequency], [Last_Insp_Date])
 
Thanks - I had tried "yyyy" - but I had it backwards, so it didn't work.

I KNEW this should be an easy fix! ☺
 
No problemo. I didn't even look at the other arguments, as I read the question to say it was working, but with days.
 

Users who are viewing this thread

Back
Top Bottom