Text Box Conditional Calculation

Chris1112

Registered User.
Local time
Today, 04:54
Joined
Sep 8, 2009
Messages
12
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
Code:
=IIF(Isnull[KRecDate], [SalesDate]+2, [KRecDate] - [SalesDate] -2)
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. :)
 
Missing 2 brackets for the Isnull :)

=IIF(Isnull([KRecDate]), [SalesDate]+2, [KRecDate] - [SalesDate] -2)
 
Thanks a ton for the help. I'm going to go be ashamed now. ;)
 

Users who are viewing this thread

Back
Top Bottom