If then Statement

C

Chris Reeves

Can someone please help me with this query.

If Rate is less than minimum, use minimum. If not use Rate. In the example
below I would need to use $500.

Rate Minimum

$100 $500


If this example I would use the Rate $600.

Rate Minimum
$600 $500


Thanks for your help.
 
J

Jeff Boyce

Chris

If you are working in a query, take a look at the IIF() function (and
syntax) in Access HELP. Your expression might look something like:

IIF([Rate]<[Minimum], [Minimum],[Rate])

This assumes that you have fields with these fieldnames, and that when the
two are equal, you use [Rate].

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Chris Reeves

Perfect. Thank you very much.

Jeff Boyce said:
Chris

If you are working in a query, take a look at the IIF() function (and
syntax) in Access HELP. Your expression might look something like:

IIF([Rate]<[Minimum], [Minimum],[Rate])

This assumes that you have fields with these fieldnames, and that when the
two are equal, you use [Rate].

Regards

Jeff Boyce
Microsoft Office/Access MVP

Chris Reeves said:
Can someone please help me with this query.

If Rate is less than minimum, use minimum. If not use Rate. In the example
below I would need to use $500.

Rate Minimum

$100 $500


If this example I would use the Rate $600.

Rate Minimum
$600 $500


Thanks for your help.
 
Top