2 dates and 2 check boxes

zgray

Registered User.
Local time
Today, 15:10
Joined
Mar 8, 2013
Messages
55
I feel like this is the simpelest thing and that i just cant seem to get it.

I have a query that has 2 dates and 2 checkboxes, among other fields. But what im wanting is that date1 or date2 is >=#8/1/2016# and that both check boxes have to be checked.

The tables are joined by a common ID number.

The where sql of my query is this

Code:
(((Query1.Date1)>=#8/1/2016#)) OR (((Query1.Date2)>=#8/1/2016#) AND ((query2.OrderedCheck)=False)) OR (((query2.SetCheck)=False));
When i run this im getting dates all the way back in 2014.

I hope i explained that right. Im frustrated with what seems should be simple.
 
what im wanting is that date1 or date2 is >=#8/1/2016# and that both check boxes have to be checked.

if the checkboxes have to be checked then they need to be true and you need an and rather than or

(Query1.Date1>=#8/1/2016# OR Query1.Date2>=#8/1/2016#) AND query2.OrderedCheck=True AND query2.SetCheck=True
 
Query1.Date1>=#8/1/2016# OR (Query1.Date2)>=#8/1/2016# AND query2.OrderedCheck=True And query2.SetCheck=True);
 

Users who are viewing this thread

Back
Top Bottom