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?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.