criteria in a query, if/then statement

  • Thread starter Thread starter soniaariana
  • Start date Start date
S

soniaariana

I am trying to write an if/then statement. I have this so far"
=IIf([Tax Escrow]="No",[Taxes]/12). It keeps giving me errors. I am
trying to get an empty field in a table labeled "tax pmt" to calculate
by the following: if the [Tax Escrow] field is check marked "No" then
divide the [Taxes] by 12. Any suggestions?
 
The IIf statement needs 3 parameters: the first one's a boolean expression,
the second one is the value to use if the boolean expression is True, and
the third one is the value to use if the boolean expression if false.

As well, while they may be called Yes/No fields in Access, they really are
Boolean fields, so they're actually storing True and False, not "Yes" and
"No".

Assuming you want the value of the field as is if Tax Escrow is false, try:

=IIf([Tax Escrow]=True, [Taxes]/12, [Taxes])
 
soniaariana said:
I am trying to write an if/then statement. I have this so far"
=IIf([Tax Escrow]="No",[Taxes]/12). It keeps giving me errors. I am
trying to get an empty field in a table labeled "tax pmt" to calculate
by the following: if the [Tax Escrow] field is check marked "No" then
divide the [Taxes] by 12. Any suggestions?
 
Back
Top