Date Range Search Null field

shall

Um which way did it go?
Local time
Today, 00:40
Joined
Mar 7, 2011
Messages
52
I am trying to find out how to get a date range search to return all records here is the code

Between [Forms]![Search]![startDate] And [Forms]![Search]![endDate]
 
Well that looks ok so what happens, what's the full SQL, we need more info.

Why does the title say "search null field"


Brian
 
Sorry i guess my title wasn't very conherent. I have a form that pulls from a query in the query is the code listed above in the Criteria field. Is it possible to make an adjustment to it to post all records if the date fields are empty?
 
Try

(Between [Forms]![Search]![startDate] And [Forms]![Search]![endDate]) Or
([Forms]![Search]![startDate] is null) Or ([Forms]![Search]![endDate] is null)


Brian
 
Thanks that worked perfect.

One other problem I have in the same search form i have 2 checkboxes what would i need to have in the criteria to get it to pull the records marked yes?

Sorry i am pretty new to Access
 
I take it that these checkboxes only appear on the Form they are not in the table(s) ie not matching fields in the query
In the Field Row Expr1: Forms!search!checkboxname
In the Criteria YES

Brian
 
The checkboxes are for Pending and Show for appointments they are listed in the query as well but i would like to be able to 1) search for date range 2) to be able to narrow it down further by checking if the Show or Pending box is checked.

If that makes any sense
 

Users who are viewing this thread

Back
Top Bottom