Count different values in text box

naminder

Registered User.
Local time
Today, 22:38
Joined
Aug 8, 2005
Messages
41
Trying to get this to work, on a continous form i have a text box in the footer to count no of records.

Want to count all that have a "B" for their value. Why won't this code work in the footer text box source

=Count([strFKBedContractTypeID])="B"
 
have you tried having the "B" inside of the ():

so could look like =Count([strFKBedContractTypeID]="B")
 
Yep, didn't work just counts all records. I know it's probably a stupid typo, noticed your from my neighbourhood ;)

EDIT:

found an answer, i needed to Sum and use an IIf to compare, cheers

=Sum(IIf([strFKBedContractTypeID]="B",1,0))
 
Last edited:

Users who are viewing this thread

Back
Top Bottom