If then Statement

  • Thread starter Thread starter Chris Reeves
  • Start date Start date
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.
 
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
 
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.
 

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

Back
Top