Access Date Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Another one ...

I have three date fields in a table and I want to return an
Approved/Unapproved in another field within the table based on these dates.
I'm not really sure how to do this.

If I were to write out what I am trying to do, it would look like this...

If today's date < 60 days of DATE1, and < 365 days of DATE2 and DATE3, then
put APPROVED in the approval field
Else put NOT APPROVED in the approval field.

Could someone help me with the syntax for this?

Also, where do I put this syntax (ie in the approval field of table?).

Thanks in advance

Paul
 
First off you should not store a calculated results - just use in a report -
as it is subject to be outdated tomorrow.

I am not sure of your wording but here goes with what I think you want.
IIF(Date()<DATE1-60 And Date()<DATE2-365 And Date()<DATE3-365, "APPROVED",
"NOT APPROVED")

This says that today must be less than DATE1 minus 60 days
AND today must be less than DATE2 minus 365 days
AND today must be less than DATE3 minus 365 days.
 
Back
Top