I am trying to calculate the value of a text box on a form with one of two formulas based on the value of another box. I would prefer to do this with the formula and not in VB (although if I must, I will).
I attempted using
I'm guessing that my formatting is wrong or that the IIF statement cannot be used in a text box calculation. This is pretty simple and I would like to avoid overcomplicating it if possible. Help is greatly appreciated. 
I attempted using
Code:
=IIF(Isnull[KRecDate], [SalesDate]+2, [KRecDate] - [SalesDate] -2)
