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 / Queries / November 2007

Tip: Looking for answers? Try searching our database.

active date field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cindy - 20 Nov 2007 18:41 GMT
I have a date field called "enddate" and a field called "active".
I want to make it so if the enddate is before today to put "no" in the
active field, and if greater than today to put "yes" in the active field. I
have done it in a query many times before and know it was something simple
but just can't remember what it was. (must be getting old). Can someone help
please.
Klatuu - 20 Nov 2007 19:08 GMT
This is the basic logic to use in your query.  There is one issue.  You said
< Date = no and > Date = Yes.  What about enddate = Date, you don't allow for
that.

IIf([enddate] < Date(), "no","yes")
Signature

Dave Hargis, Microsoft Access MVP

> I have a date field called "enddate" and a field called "active".
> I want to make it so if the enddate is before today to put "no" in the
> active field, and if greater than today to put "yes" in the active field. I
> have done it in a query many times before and know it was something simple
> but just can't remember what it was. (must be getting old). Can someone help
> please.
Cindy - 29 Nov 2007 16:12 GMT
Thank you

> This is the basic logic to use in your query.  There is one issue.  You said
> < Date = no and > Date = Yes.  What about enddate = Date, you don't allow for
[quoted text clipped - 8 lines]
> > but just can't remember what it was. (must be getting old). Can someone help
> > please.
 
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.