I am doing a DLOOKUP calculation in a query, where if my record is of a certain type (based on a field setting), I want to lookup a date from a different table. If it is not of that type, I want to return a Null value (I do not want to return any date).
I am using DLOOKUP, because if I setup a LEFT JOIN query, my query becomes un-updateable, and it needs to be updateable, since it is the Source of an entry Form.
The issue is, if I try structuring my formula like this:
=IIF([Field1]="Annual",DLOOKUP([DateField1],...),Null)
The value it return is Text (even the Date Values it returns). I need it to return a Date Value, since it is being used in Due Date calculations.
If I replace "Null" with some dummy date, like DateValue("1/1/1900"), then all the fields it returns are date, but I do not want to display this date on my Form, nor should it be used in my calculations.
I suppose a simple workaround would be to use Conditional Formatting and format all 1/1/1900 dates to be the same color as the background so it is essentially "invisible", but I would prefer not to have to do this, if possible.
Is there any easy way to do what I want (without making a complex workaround)?