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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query blank when no dates entered 1

Status
Not open for further replies.

istone

IS-IT--Management
Jan 24, 2007
139
US
Hi,
I have a query with the following criteria:
Between form!Main!Begdate And form!Main!Enddate
Begdate and Enddate are 2 text boxes in the form Main.
This works perfectly.
I need help in making the query gives me all dates if I leave the 2 boxes blank. Right now if the 2 boxes are bank I get query with no data.
I hope my question is clear. Thanks in advance
 
You may try this:
Between form!Main!Begdate And form!Main!Enddate OR (form!Main!Begdate Is Null AND form!Main!Enddate Is Null)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top