Need a little help with programming a search feature for my database.
I'm searching by a date and an order number. My criteria for the two are as follows:
<[Forms]![frmSearch]![txtHiddenDate]
and
[Forms]![frmSearch]![txtfleet]
It works fine, unless I leave one of those fields in frmSearch blank. I want it to return all records if the fields are left blank. I've tried the NZ function in the criteria line, which I've used before with an "*". Doesn't seem to work this time for some reason. Any ideas on how I can get the query to return all the records? Thanks for the help in advance.
I'm searching by a date and an order number. My criteria for the two are as follows:
<[Forms]![frmSearch]![txtHiddenDate]
and
[Forms]![frmSearch]![txtfleet]
It works fine, unless I leave one of those fields in frmSearch blank. I want it to return all records if the fields are left blank. I've tried the NZ function in the criteria line, which I've used before with an "*". Doesn't seem to work this time for some reason. Any ideas on how I can get the query to return all the records? Thanks for the help in advance.