I've searched this forum for this similar problem and found many similar posts. But none of them seem to solve my issue. So hopefully someone here has a simple solution.
I have a form with two text boxes called
txtFromDate
txtToDate
When the user enters a date in the text boxes, the query will find the dates between the two boxes. So in the query column of the field "Open" I entered,
Between [Forms]![frmSummary]![txtFromDate] And [Forms]![frmSummary]![txtToDate]
This works fine when the user enters a date in both boxes, but not when one or both is left blank.
Basically, what I would like to have happen is, show ALL records if both To and From boxes are left blank.
Or All records prior to the "To" date if just the txtToDate is filled
Or All records After the "From" date if just the txtFromDate is filled.
Is this possible from just a single query?
Thanks
I have a form with two text boxes called
txtFromDate
txtToDate
When the user enters a date in the text boxes, the query will find the dates between the two boxes. So in the query column of the field "Open" I entered,
Between [Forms]![frmSummary]![txtFromDate] And [Forms]![frmSummary]![txtToDate]
This works fine when the user enters a date in both boxes, but not when one or both is left blank.
Basically, what I would like to have happen is, show ALL records if both To and From boxes are left blank.
Or All records prior to the "To" date if just the txtToDate is filled
Or All records After the "From" date if just the txtFromDate is filled.
Is this possible from just a single query?
Thanks