If number >8, subtract 8 /if txtlot is null then this is null too

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to make a text box (txtfinal) that has an expression like this:
If "txt1" >8, then subtract 8 from "txt1"
and also if txtName is null then this is null too

"txt1" is a text box from a form that has a mathematical equation on it.
the final number is imported into the "txtFinal" if the number is greater
than 8 it needs to have 8 subtracted from it.

"txtName" is a box on the same report with user name in it (if it is null
the "txtFinal" does not need to appear).

Can anyone help me?
 
In control source of txtfinal write
=IIf([txt1] Is Null,[txt1],IIf([txt1] > 8, [txt1]-8,[txt1]))
 
Can txt1 be > 16?

If it can, do you still want to subtract by 8 or the highest possible
multiple of 8 that less than txt1?
 
Please post the expression you tried AND answer clarifying questions from
respondents.
 
Back
Top