Hello all,
I've got a field named coffee that I'd like to count the number of times people drink it black or with cream, etc. The data is selected from a look up table and the query creates a variable which will then populate a report.
My lookup table called coffee_flavor contains one field (flavor) with the following data:
Black
Cream
Sugar
Cream & Sugar
In the query I use the following formula to count them:
black_count: Count([coffee]=Black)
etc.
The problem is I think Access is assuming the data Black is a field and is giving me a Enter Parameter Value window and encloses it with brackets. If I enclose Black with quotes it gives me the number of records where this field has data in it.
Is the format/syntax wrong or should I be using a different function?
I've got a field named coffee that I'd like to count the number of times people drink it black or with cream, etc. The data is selected from a look up table and the query creates a variable which will then populate a report.
My lookup table called coffee_flavor contains one field (flavor) with the following data:
Black
Cream
Sugar
Cream & Sugar
In the query I use the following formula to count them:
black_count: Count([coffee]=Black)
etc.
The problem is I think Access is assuming the data Black is a field and is giving me a Enter Parameter Value window and encloses it with brackets. If I enclose Black with quotes it gives me the number of records where this field has data in it.
Is the format/syntax wrong or should I be using a different function?