To troubleshoot this yourself in the future, I recommend that you
concentrate on the Yes/No field. Remove everything else from the
criteria. Get the query returning the "unchecked" records, then work on
the date fields. However, read on:
Ok, when I run it with the below SQL(s) I get "All" records, both
checked and unchecked....I only want unchecked or rather the "no"
records from a "Yes/No" check box field.
The SQLs I have used:
WHERE (([UT Field Rep Tagging]![Added to Define]=Null) AND (([Daily
Nobody has recommended using "=Null". We have all explicitly said "Is
Null". A field will never "=" Null
Tagging Report].[Date Tagged]) Between [Start Date] And [End Date]))
OR ((([Start Date]) Is Null) AND (([End Date]) Is Null))
ORDER BY [Daily Tagging Report].[Date Tagged];
I've also used
WHERE (([UT Field Rep Tagging]![Added to Define]=0) AND (([Daily
Tagging Report].[Date Tagged]) Between [Start Date] And [End Date]))
OR ((([Start Date]) Is Null) AND (([End Date]) Is Null))
ORDER BY [Daily Tagging Report].[Date Tagged];
I've also used:
WHERE (([UT Field Rep Tagging]![Added to Define]="0") AND (([Daily
Tagging Report].[Date Tagged]) Between [Start Date] And [End Date]))
OR ((([Start Date]) Is Null) AND (([End Date]) Is Null))
ORDER BY [Daily Tagging Report].[Date Tagged];
Also:
WHERE (([UT Field Rep Tagging]![Added to Define]="No") AND (([Daily
Tagging Report].[Date Tagged]) Between [Start Date] And [End Date]))
OR ((([Start Date]) Is Null) AND (([End Date]) Is Null))
ORDER BY [Daily Tagging Report].[Date Tagged];
So, what am I doing wrong?
Well, you're not following my suggestion, which was to check for both
conditions. I assume [Added to Define] is the relevant field, correct?
So go into SQL View and replace your WHERE clause with this:
WHERE ([UT Field Rep Tagging].[Added to Define] is Null Or [UT Field Rep
Tagging].[Added to Define]=0)
Run it. Does it retrieve the expected records? If so, add the date
criteria back in.