Access Date Question

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top