Connecting Tech Pros Worldwide Help | Site Map

count

  #1  
Old November 12th, 2005, 03:33 PM
G
Guest
 
Posts: n/a
I need to be able to count accounts as they are entered by operators. Each
account number has fields such as "Statements req date" and "Application req
date".
I would like the database to count each account number once the "Statements
req date" and "Application req date" are populated.
Note: both of these two fields could be populated with a date for the one
account. If this happens, then I don't want the database to count this
account entry as 2 but rather as 1.
How could i do this in a query?
I want to be able to reach the number 50 so that I could get a message that
50 has been reached then reset the number back to zero.


  #2  
Old November 12th, 2005, 03:35 PM
Doug M
Guest
 
Posts: n/a

re: count



"G" <sky5@optusnet.com.au> wrote in message
news:3f951115$0$3699$afc38c87@news.optusnet.com.au ...[color=blue]
> I need to be able to count accounts as they are entered by operators. Each
> account number has fields such as "Statements req date" and "Application[/color]
req[color=blue]
> date".
> I would like the database to count each account number once the[/color]
"Statements[color=blue]
> req date" and "Application req date" are populated.
> Note: both of these two fields could be populated with a date for the one
> account. If this happens, then I don't want the database to count this
> account entry as 2 but rather as 1.
> How could i do this in a query?
> I want to be able to reach the number 50 so that I could get a message[/color]
that[color=blue]
> 50 has been reached then reset the number back to zero.
>
>[/color]

SELECT Sum(Abs(IsDate([statmtReqDate]) Or IsDate([acctReqDate]))) AS HasDate
FROM tblAccount;

where statmtReqDate and acctReqDate are your two date/time fields with
return a sum of accounts where either or both date is set. If the same
account number is in two records it will be counted twice if they both have
a date.

Doug Munich
doug@munich.ca



Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Count number into form Variable or FormField jlt206 answers 1 July 25th, 2008 03:50 AM
Select Count(*) problem MP answers 22 October 27th, 2006 01:55 AM
How to split one data field into 3 and count number of rows in each? heckstein answers 1 September 19th, 2006 02:23 PM
Can't override CollectionBase.Count? Eric Johannsen answers 5 November 15th, 2005 03:27 PM
C program to count occurences of substrings in strings JD answers 1 November 15th, 2005 05:41 AM