SteveL13
asked on
Expression in a query
Using query designer I have this code:
TouringCount: Abs(Count([ID]) And [PublicActivityCode]="GT")
Which doesn't work. I'm trying to count the records (ID) where PublicActivityCode] = "GT" or "ST".
It needs to be an expression because I have more of these types of fields to add.
TouringCount: Abs(Count([ID]) And [PublicActivityCode]="GT")
Which doesn't work. I'm trying to count the records (ID) where PublicActivityCode] = "GT" or "ST".
It needs to be an expression because I have more of these types of fields to add.
Hi,
You can also create a field using the expression
dcount("ID",yourtable,"Pub licActivit yCode='GT' ")
but this will be slower.
Regards,
Bill
You can also create a field using the expression
dcount("ID",yourtable,"Pub
but this will be slower.
Regards,
Bill
FYI - ABS is not required. Count can never be <0.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Change the query to group by
Put [ID] as a count field in the query
Make criteria [PublicActivityCode]="GT"
Regards,
Bill