Hello Folks:
I am trying to use the Count function in a text box for a report. I have used the Count funtion before and it works fine; but here is my problem. I would ONLY like to count the field if certain criteria is met. For instance, let us assume that a combo box exists in which the user can select A, B, C, or D. I am trying to count the A's, B's, C's, and D's. Only count them and not display any other information. Currently, I am using the following equation but it does not work:
=Count([PlanCode]= 'A')
This equation, which is in a textbox, returns a count of ALL records. It will return 10 if ten records exist; but only 2 records with a [PlanCode] of 'A' exist. I am not sure what I am doing wrong?
If someone can help me, I would really appreciate it. Thank you!!
Joe
I am trying to use the Count function in a text box for a report. I have used the Count funtion before and it works fine; but here is my problem. I would ONLY like to count the field if certain criteria is met. For instance, let us assume that a combo box exists in which the user can select A, B, C, or D. I am trying to count the A's, B's, C's, and D's. Only count them and not display any other information. Currently, I am using the following equation but it does not work:
=Count([PlanCode]= 'A')
This equation, which is in a textbox, returns a count of ALL records. It will return 10 if ten records exist; but only 2 records with a [PlanCode] of 'A' exist. I am not sure what I am doing wrong?
If someone can help me, I would really appreciate it. Thank you!!
Joe