Posted on 2001-09-06
I am stumped on this one.
I have a 'search' form where users can select/enter criteria to search on. Five of them are date to and from boxes for 5 different date fields.
When the user types in a from/to date the query is simple, I use a between forms!frmMenuInquiry!txtFrom and to syntax. This works. However, how do I get it to work if the user doesn't enter a date? ie a null entry means find everything. One way would be to create a query for every eventuality for the form and use a Select Case statement to see if a date has been entered in the date field. That would be ok for one maybe two dates, but 5 results in over 20 different possible combinations.
Does this make much sense?