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 / October 2007

Tip: Looking for answers? Try searching our database.

indicator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JOM - 30 Oct 2007 21:56 GMT
I have the following columns in my query empid, courseA, datecompA, courseB,
datecompB, courseC, datecompC.  What I need is an extra column that will have
an indicator Yes if any of the 2 dates(i.e., datecompA, datecompB, datecompC)
have  dates, blank if all 3 dates have dates and No if only of the dates has
a date.
Ofer Cohen - 30 Oct 2007 22:34 GMT
Not sure what the third criteria is, but you can use something like

Abs(IsNull(datecompA) + IsNull(datecompB) + IsNull(datecompC))

The IsNull will return -1 (True) Or 0 (False) if the date is empty.
The Abs will return the Absolute number
So, adding all the -1 will add up to the number of date field that are filled

IIf(Abs(IsNull(datecompA) + IsNull(datecompB) + IsNull(datecompC)) = 2
,"Yes",IIf(Abs(IsNull(datecompA) + IsNull(datecompB) + IsNull(datecompC)) = 3
, Null , "No"))

Signature

Good Luck
BS"D

> I have the following columns in my query empid, courseA, datecompA, courseB,
> datecompB, courseC, datecompC.  What I need is an extra column that will have
> an indicator Yes if any of the 2 dates(i.e., datecompA, datecompB, datecompC)
> have  dates, blank if all 3 dates have dates and No if only of the dates has
> a date.
JOM - 30 Oct 2007 23:01 GMT
Thanks alot that worked perfect...

> Not sure what the third criteria is, but you can use something like
>
[quoted text clipped - 13 lines]
> > have  dates, blank if all 3 dates have dates and No if only of the dates has
> > a date.
 
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.