Date range query

Lifeseeker

Registered User.
Local time
Today, 02:47
Joined
Mar 18, 2011
Messages
273
Hi,

Could some one please help me on this?

I have a form-based search which will bring up a report showing records based on parameters.

3 textboxes in total on the search form. The 1st one is a text field and the query behind it is....like iif(text1 = "", "*", text1). So this will return results that match what's in the text 1. If there is empty record, the the query will skip it. This works fine until...


Now I would like to have the same type of query logic on the date textbox. There are two date textboxes("from" and "to"). The syntax behind them now is.....between (text 5) and (text 6). On the "OR" line under criteria, I put text 5 is Null, and text 6 is null.


When I run the query from the form, the report returns all results still. I suspect is the "OR" problem.


The correct result should be that if there a record that doesn't have a date, the query should not include it at all.


Please someone help me on this.

comment much appreciated.
 

Users who are viewing this thread

Back
Top Bottom