IIF (add a condition)

Super Contributor


How can I add another condition to the below to return [ParentSettle] if txtDtSetC is Null.  I am not sure if IIF is advisable for this? 

In English:

If txtDtSetC is NULL then return [ParentSettle]

then return as below



thank you

2 Replies
best response confirmed by Tony2021 (Super Contributor)

is the expression in the Form?
if ParentSettle field is also in the Form or Recordsource of the form:

=IIf(Val([txtDtSetC] & "")>Val([ParentSettle] & ""),[txtDtSetC],[ParentSettle])

amazing. Works perfectly! thank you!!