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 2005

Tip: Looking for answers? Try searching our database.

ADP Status based on Dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnR - 29 Nov 2005 21:02 GMT
I have three date fields, EffectiveDate, DisconnectDate, and SuspendDate.  I
want to create a status field where the result will be Active, Inactive, or
Suspended based on whether there is a date in the field.  What is the SQL
Statement needed to accomplish this in an Access Project?

Status                  EffectiveDate               DisconnectDate
SuspendDate
Active                  Has Date                     Is Null
Is Null
Inactive                Has Date                     Has Date
May or May not have date
Suspended           Has Date                     Is Null
Has Date

Thank you in advance for your assistance.

John
Anton - 29 Nov 2005 21:40 GMT
Hi John,

I usually create a user-defined function to solve multiple criteria. If
I am in your shoe, I will create a short function that accepts those
three parameters and the return value is either string or numeric. The
drawback is the speed, and it can only be used with MDB.
But it is easier to maintain, esp. if there will be any changes on
those criteria in the future.

HTH

Anton
 
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.