Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statements 1

Status
Not open for further replies.

ocan

Programmer
Jun 28, 2004
31
US
I have a text box in a report, where the control source is an If statement.

=IIF([Drum Additive=-1,Round(([Text131]*[LBS per gal])/0.5,0)*0.5)

This works..........but if I want to add a 2nd If statement to this how could I make this work. I want the text box to do:

=IIF([Drum Additive=-1,Round(([Text131]*[LBS per gal])/0.5,0)*0.5)

OR

=IIF([Units(Blend)]="LBS",[Text142])
 
Perhaps this ?
=IIf([Drum Additive]=-1, Round(([Text131]*[LBS per gal])/0.5,0)*0.5, IIf([Units(Blend)]="LBS",[Text142],0))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

In my 1st message I should of specified there may be situations where [Drum Additive]=-1 and [Units(Blend)]="LBS" and we would need the text box to yield a #.

=IIF([Drum Additive]=-1,Round(([Text131]*[LBS per gal])/0.5,0)*0.5)

AND

=IIF([Units(Blend)]="LBS",[Text142])

And If not text box is blank

Thank you for you help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top