I am trying to pick the correct date (Result Date) when comparing two dates in an Access query. I am able to determine which date to pick first in an IIf statement if one of the date fields is Null by the following function:
=iif(IsNull(Second Date), First Date)
but I haven't been able to figure out how to add the "then" to pick the Maximum of the remaining dates. So my data currently looks like (see attachment for clearer view of columns):
First Date Second Date Result Date
I need guidance on how to get the blanks in the Result Date filled in with the max of the two dates. Hope this makes sense. Thanks.