Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help using count...but may be a better way to do this...

Status
Not open for further replies.

Seabz420

IS-IT--Management
Jul 14, 2003
129
CA
Here's the situation. (skip to bottom for question!!) I have a report that finds all the transactions for each member, per month. Only one of these transactions are service charges, and not everyone will have one. I've gone through and pulled the last 2 digits from a field that denotes the service charge (if the last two digits are SC then it's a service charge, otherwise it's not). I've gone through and set a flag field so if the trasaction is a service charge, the flag is set to 1 else it's set to 0. I then add all the flags for each member is if it equals 1 then the account is charged a service charge and if it's 0 then the account isn't charged a service charge. Now, I need to go and count all the accounts that are charged service charges and all the accounts not charged (for each product type...ie: chequing account, saving account, etc..). To do this final count, (and since I can't do a count on the (sum of the flags)field, I've created another flag so if the sum = 1 then the account gets a yes else it gets a no.

I want to count the yes's (in one field) and the no's (in another field) but i don't know how to use the count function properly. How do I say count all the fields equal to "yes"? Long story for such a short question!!!
 
Since you have already walked the path of setting variables, just add another for grand total and add one to it every time a customers total ='s 1. You just need to not reset it for each group.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top