Less than greater than

R

Rocket

Hello,
I am trying to build an expression that based from three fields; Price,
Pounds, and Minimum charge. I would like to be able to say if the value from
the two fields is less then minimum charge then equal minimum charge. I am
able to do this in excel, but not so in access. Here is the formula I used in
excel =if(c2*f2<e2,e2,+c2*f2). C=price, F=pounds and E= minimum charge.
Thanks in advance for your time.

Rocket
 
S

storrboy

Hello,
I am trying to build an expression that based from three fields; Price,
Pounds, and Minimum charge. I would like to be able to say if the value from
the two fields is less then minimum charge then equal minimum charge. I am
able to do this in excel, but not so in access. Here is the formula I used in
excel =if(c2*f2<e2,e2,+c2*f2). C=price, F=pounds and E= minimum charge.
Thanks in advance for your time.

Rocket

In a controlsource:
=IIF([Price]*[pounds]<[minimum charge],[minimum charge],
[Price]*[pounds])

In a query:
IIF([Price]*[pounds]<[minimum charge],[minimum charge],
[Price]*[pounds]) AS FieldName
 
R

Rocket

storrboy said:
Hello,
I am trying to build an expression that based from three fields; Price,
Pounds, and Minimum charge. I would like to be able to say if the value from
the two fields is less then minimum charge then equal minimum charge. I am
able to do this in excel, but not so in access. Here is the formula I used in
excel =if(c2*f2<e2,e2,+c2*f2). C=price, F=pounds and E= minimum charge.
Thanks in advance for your time.

Rocket

In a controlsource:
=IIF([Price]*[pounds]<[minimum charge],[minimum charge],
[Price]*[pounds])

In a query:
IIF([Price]*[pounds]<[minimum charge],[minimum charge],
[Price]*[pounds]) AS FieldName

Thank You!!!
 
Top