CutAndPaste
Registered User.
- Local time
- Today, 12:54
- Joined
- Jul 16, 2001
- Messages
- 60
I'm trying to count the number of records in a query, I've got two fields to compare: gender and a yes/no field.
In other NONE Yes/No Fields calculation I'm using
=(DCount("*","qryName","[Gender]=1 And [OtherFieldValue] = 1"))
and this returns the number of records with the Gender Value of 1 and the Field value of 1 in my [OtherField].
However, some of my [OtherFields] are Yes/No fields and I want to count how many of these are yes for a given value. I'm trying to use
=(DCount("*","qryName","[Gender]=1 And [YesNoField1] = '-1'"))
OR
=(DCount("*","qryName","[Gender]=1 And [YesNoField1] = -1"))
but these give me an #Error message. What am I doing wrong, and can I count Yes/No fields in this way?
tx
In other NONE Yes/No Fields calculation I'm using
=(DCount("*","qryName","[Gender]=1 And [OtherFieldValue] = 1"))
and this returns the number of records with the Gender Value of 1 and the Field value of 1 in my [OtherField].
However, some of my [OtherFields] are Yes/No fields and I want to count how many of these are yes for a given value. I'm trying to use
=(DCount("*","qryName","[Gender]=1 And [YesNoField1] = '-1'"))
OR
=(DCount("*","qryName","[Gender]=1 And [YesNoField1] = -1"))
but these give me an #Error message. What am I doing wrong, and can I count Yes/No fields in this way?
tx