Solved

And/or clause in querry

Posted on 2014-03-22
1
184 Views
Last Modified: 2014-03-22
I am using the below "WHERE" clause. I would the querry to show any result where either one is "Yes", they both don't have be "Yes"... if one or the other is "Yes" then I would like it so show the query. Any idea how I write that?

WHERE (((Bookings.CheckPay)=Yes) AND ((Bookings.ChargeWeekBefore)=Yes))
0
Comment
Question by:cansevin
1 Comment
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39947387
If these are true yes/no fields, you want to use true and false, so it would be:

WHERE Bookings.CheckPay = True OR Bookings.ChargeWeekBefore = True

Jim.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question