Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Access Date Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 05 Jul 2006 23:58 GMT
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
KARL DEWEY - 06 Jul 2006 01:12 GMT
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.

> Another one ...
>
[quoted text clipped - 15 lines]
>
> Paul
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.