If Statement in Textbox

P

phildenuh

Hi, am try to do multiple calculation on a report using a textbox. I
have the following if statement and I want it to go along the table
and calculate the length of values in column "a". I have
IIf([DieNumber]="#177 Lift",[OAF Width]-3.9876) Or
IIf([DieNumber]="#155 Mtg Bar",[OAF Width]-2.8797)
Right now I am getting only one value to print on the report. Based on
the number of items in the table, I want it to calculate using each
items formular and return the answers on the report. how do I do this?
Please help.
 
F

fredg

Hi, am try to do multiple calculation on a report using a textbox. I
have the following if statement and I want it to go along the table
and calculate the length of values in column "a". I have
IIf([DieNumber]="#177 Lift",[OAF Width]-3.9876) Or
IIf([DieNumber]="#155 Mtg Bar",[OAF Width]-2.8797)
Right now I am getting only one value to print on the report. Based on
the number of items in the table, I want it to calculate using each
items formular and return the answers on the report. how do I do this?
Please help

If there are only 2 possibilities:
=IIf(SomeCtiteria = True, True part, False Part)

If there are at least 3 possibilities:
=IIf(SomeCtiteria = True, True part 1,IIf(OtherCriteria = True, True
part 2, False Part))

If those are only 2 possibilities for [DieNumber], then:

=IIf([DieNumber]="#177 Lift",[OAF Width]-3.9876, [OAF Width]-2.8797)

If there might be third possibility, what do you wish to do?

=IIf([DieNumber]="#177 Lift",[OAF Width]-3.9876, IIf([OAF
Width]-2.8797, Neither of the other here))
 
Top