Re: Total count of multiple fields?... Is that possible?
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Tue, 18 Dec 2007 11:45:13 -0500
Try:
SELECT COUNT(*)
FROM tableName
WHERE (Closed IS NULL) OR Terminated
in SQL view, not in graphical view.
Vanderghast, Access MVP
"TomP" <TomP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E0CCC2AB-894C-41C9-8418-1575546BAD0E@xxxxxxxxxxxxxxxx
I entered the info in the query design mode and could not run it.
"KARL DEWEY" wrote:
Try this --
SELECT Sum(IIf([Closed] Is Not Null Or [Terminated]=-1,1,0)) AS Expr1
FROM TomP;
--
KARL DEWEY
Build a little - Test a little
"TomP" wrote:
Here are the fields I need to manipulate
Field 1: Account (Text field with validation rule)
Field 2: Closed (Date field)
Field 3: Termination (Yes/No)
I want to be able to get a total count of records not closed or
terminated.
The condition should be to count everything except for the ones that
are
"Closed" and also marked for "Termination".
My concern is that if the termination field is "checked" ... it may or
may
not have an entry in the closed field which may count the records
twice.
The termination field is used because the case may have been forwarded
or
terminated for other reasons which is entered in a separate field for
"comments".
Any help would be appreciated.
.
- Follow-Ups:
- Prev by Date: Re: Matching fields between 3 tables
- Next by Date: Re: Subquery Help?
- Previous by thread: Re: Matching fields between 3 tables
- Next by thread: Re: Total count of multiple fields?... Is that possible?
- Index(es):
Relevant Pages
|