I have a form called "Switchboard". On the form are two text boxes formatted for date called "SearchText1" and "SearchText2". I also have a query called "Main Events Table Query". "Main Events Table Query" has the criteria below in the criteria field of the field "Event Start Date". When a user types in a date range in the two text boxes it will pull up records whose value in "Event Start Date" field is between those two dates. HOWEVER, if the user leaves one or both fields blank it will not pull up any records. The code I'm using to do this is below. Is there a way to construct the expression below in such a way that if the user leaves the fields blank ALL records will come up instead of none? In other words I want the user to have the option to either use dates in their search criteria when they open the following form or else not use dates in their search criteria when they open the form.
Code:
Between [Forms]![Switchboard]![SearchText1] And [Forms]![Switchboard]![SearchText2]
Thank you for any assistance.
PS: The form "Switchboard" has a button on it which opens up the form "Main Events Form" which is populated by the query "Main Events Table Query". So when the user types in their filter criteria on the form Switchboard and then clicks the button to launch "Main Events Form" the form will load with the records matching the desired criteria.
Please let me know if you need any other info. Thanks again.