If statement in Query

fenhow

Registered User.
Local time
Today, 14:11
Joined
Jul 21, 2004
Messages
599
Hi,

I have a query that runs a sum value based on a group.

in the same query I take that value and multiply it by 20 to get a number.

Table Calc Payout: Sum([si_Total_Surface_Tract_Acres]*20)
It works great!

What I am trying to do is if the total of the sum value is less than <1.25 then show a fixed number 25. Not the calculated value.

Is there anyway to do this in the query expression? I am trying this but it will not work.

IIf([si_Total_Surface_Tract_Acres]<2,"25.00")

Thanks.

Fen How
 
put the calced field in the expression sir:
PHP:
iif(sum(field * 20) < 1.25, 25, sum(field * 20))
 
Thanks, that looks real good, I am getting a data type mismatch error? So close..
 
Adam, Nice to hear from you.

Thanks for you help.

This is what worked.

IIf(Sum([si_Total_Surface_Tract_Acres])<1,25,Sum([si_Total_Surface_Tract_Acres]*20))
 

Users who are viewing this thread

Back
Top Bottom