You can look up definitive help on the DateDiff Function in Access Help, but basically it calculates the difference in a given time/date 'Interval' between two dates.
In the above, the Interval is "d," the designation for 'days.'
The next two arguments are the Dates to be used in the calculation: Now and hazardDateCreated.
Now() is a Function that returns the Current Date and Time, per your computer's clock. Since we're only dealing with days, here, I'd use Date() instead, which only returns the Date. I'll explain this below.
The [hazardDateCreated] is the name that the Court Jester, above, gave to the DateTime Field you used to record when the hazard was created. When using this code, you'd need to replace it with the actual name of your Field.
So, in plain language, if the difference between the day the hazard was created and the Current Date is equal to or greater than 275 days, you are within 90 days of the creation date's anniversary, and you need to pop a warning.
Now for the Now/Date explanation:
Using Now(), unless there is a valid need for having the Time portion of the DateTime, is a bad idea. For instance, if a Value of a Field, was entered, by code, with Now(), and later you needed to compare that Value with the Current Date, it being assigned using Date() or 9/25/2012, you would only get a match if your second code did the comparison at the exact same Date/Hour/Minute/Second as your original code, using Now() was run. This is because when you only enter the Date Portion in a DateTime Field, Access automatically adds on Midnight as the Time Portion.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007