I have a start date control and an end date control to search a record source (date field). I found a thread with the expression to do the search but it doesn't completely work for me. The reason is I haven't populated all the table date fields (some are null) and when I don't have anything in start date and end date control it gives all the values without nulls. I would really like it to show all values including nulls. How would I adjust the expression to do so? Also would someone be able to explain the whole expression to me so I understand what is going on with it? I don't understand the portion that says [Forms]![DataEntry]![startdate] & ""="". I understand the true and false part of the if statement. Thank you for your help.
https://www.accessforums.net/forms/s...orm-13232.html
Code:
Between IIf([Forms]![DataEntry]![startdate] & ""="",#1/1/1900#,[Forms]![DataEntry]![startdate]) And IIf([Forms]![DataEntry]![enddate] & ""="",Date(),[Forms]![DataEntry]![enddate])