Query

  • Thread starter Melissa needing help!!
  • Start date
M

Melissa needing help!!

I have a query done with a column called Bar Service, it's a Yes/No coloumn.
Not all of our events has Bar Service so sometimes the answer is NO. I want
to have another column that gives me the total of "Yes" for Bar Service.
What would my formula be?

Thanks for your help
 
D

Duane Hookom

If you need to count the number of records in a table/query where [Bar
Service] is True/Yes/-1, use sql like:

SELECT Sum(Abs([Bar Service]=-1) ) as NumOfBarServices
FROM qryYourQuery;
 
J

John Vinson

I have a query done with a column called Bar Service, it's a Yes/No coloumn.
Not all of our events has Bar Service so sometimes the answer is NO. I want
to have another column that gives me the total of "Yes" for Bar Service.
What would my formula be?

Thanks for your help

Sum(Abs([Bar Service]))


John W. Vinson[MVP]
 
Top