By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

count

P: n/a
G
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.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"G" <sk**@optusnet.com.au> wrote in message
news:3f**********************@news.optusnet.com.au ...
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.


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
do**@munich.ca

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.