Expression in query

I am building a query in design mode. I have the following Field which is working properly:

BookedTrue: Abs(Sum([Booked]=Yes))

I want to add another criteria to this field. I want it to still sum the Booked=Yes and if TypeOfClient="1".

Is there a way to add that criteria to the sum function?

Chris
cansevinAsked:
Who is Participating?
 
Dale FyeCommented:
If [Booked] is a Yes/No field, then, as I indicated in your other question, the actual values stored in the database are 0 or -1.  If the TypeOfClient field is a text field, then you would wrap the value of 1 in quotes.  If it is a numeric data type, you do not need the quotes.

If you want to create a query based on that field, the where clause would look like:

WHERE [Booked] = -1 AND [TypeOfClient] = "1"

or, if TypeOfClient is actually a number, then

WHERE [Booked] = -1 AND [TypeOfClient] = 1
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.