Help with IIF statement

R

Randy

Access 2000 I can not get the following IIF statement to produce the correct
result. Can anyone help?
=IIf([Text224]+[Text226]>[Excess Moisture],Int(([Excess
Moisture]*[Text65])*10^2)/10^2/100,Int(([Excess
Moisture]*[Text65])*10^2+0.5)/10^2/100)

What I need is If [Text224] and [Text226] is greater than [Excess Moisture]
than the number should not round up, otherwise it should.

My data is [Text224] = 2.00, [Text226] = .01 [Excess Moisture] is 2.00 in
this case I need [Text224] to be 1.99 so the two balances out to 2.00. I
hope this helps, Thanks, Randy
 
N

NetworkTrade

not sure if the issue here is syntax or math....

in english:

If [Text224A] = 2.00 + [Text226] = .01 > [Excess Moisture] at 2.00 (which it
would be in this case) Then [Text224B] = [Excess Moisture] - [Text226]
i.e. 1.99

you have text224 changing values it would appear...
 
K

kingston via AccessMonster.com

=IIf([Text224]+[Text226]>[Excess Moisture],Int([Excess Moisture]*[Text65]),
IIF(([ExcessMoisture]*[Text65])-Int([ExcessMoisture]*[Text65])>0,Int(
[ExcessMoisture]*[Text65])+1,Int([ExcessMoisture]*[Text65])))

This assumes ([ExcessMoisture]*[Text65]) is always positive.
Access 2000 I can not get the following IIF statement to produce the correct
result. Can anyone help?
=IIf([Text224]+[Text226]>[Excess Moisture],Int(([Excess
Moisture]*[Text65])*10^2)/10^2/100,Int(([Excess
Moisture]*[Text65])*10^2+0.5)/10^2/100)

What I need is If [Text224] and [Text226] is greater than [Excess Moisture]
than the number should not round up, otherwise it should.

My data is [Text224] = 2.00, [Text226] = .01 [Excess Moisture] is 2.00 in
this case I need [Text224] to be 1.99 so the two balances out to 2.00. I
hope this helps, Thanks, Randy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with expression not rounding properly 2
IIF statement help 13
Address box with IIf Statement 7
IIf statement 2
Help with Nested IF Then statement? 3
Iif Query 5
IIF Statement 3
iif functin in report 5

Top