Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including Null (blank) Fields within a date range search in a Query 1

Status
Not open for further replies.

Triacona

Technical User
Jun 11, 2009
462
GB
Hi,

I have a dilemma...
I have a query which searches on date ranges, but within the Date Range I want to include null values ...
Here are the criteria I use within query design view:

Between ([Forms]![ChooseDates].[StartDate]) And Date()

Every time I add in (at the end or in the beginning) And is Null I get no values as an output for my query.

How would I go about this?
Any help would be greatly and gratefully appreciated [smile]
kind regards
Triacona
 
In SQL view:
WHERE ([yourDateField] Between [Forms]![ChooseDates]![StartDate] And Date() OR [yourDateField] Is Null)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV,

Thank you for your help [smile]

I have used the or and by duplicating the criteria for the rest of the fields, managed to get the right number.

Kind regards
Triacona [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top