A
alexs
Hi,
I am trying to generate a count based on 2 criteria. The expression works
properly when I use either of the criteria on its own but when I combine with
the AND, the results shows a total which is equal to all records.
This expression is based on 2 fields in the same query (one contains a full
date and the other has nationality). I'm simply trying to count records for
those members who joined last year that have "united states" for their
nationality. I'm not hard coding the date so that this can be run in future
years for the previous year.
I am sure my combined formula is wrong but I cannot seem to figure this one
out - here is my current expression:
=DCount("*","all membership query","DatePart('yyyy',[All Membership
Query]![DATE_JOINED])=Year(Date())-1" And "[All Membership
Query]![nationality family]='united states'")
Thanks for any hints...
I am trying to generate a count based on 2 criteria. The expression works
properly when I use either of the criteria on its own but when I combine with
the AND, the results shows a total which is equal to all records.
This expression is based on 2 fields in the same query (one contains a full
date and the other has nationality). I'm simply trying to count records for
those members who joined last year that have "united states" for their
nationality. I'm not hard coding the date so that this can be run in future
years for the previous year.
I am sure my combined formula is wrong but I cannot seem to figure this one
out - here is my current expression:
=DCount("*","all membership query","DatePart('yyyy',[All Membership
Query]![DATE_JOINED])=Year(Date())-1" And "[All Membership
Query]![nationality family]='united states'")
Thanks for any hints...