IIF equation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Microsoft Access , why won't the following equation work in the control
source field?
IIF ([TANK DIA] <=149,.16,.25) AND ([TANK DIA] >=150 & <=200,.20,.25)
I'm trying to automate a field to where if the tank diameter field is less
than or equal to 149 return .16 , if the tank diameter field is greater than
or equal to 150 and less than or equal to 200 return .20, if the tank
diameter field is greater than 200 return .25
 
It "won't work" (you don't say what that means, but what you wrote is the
wrong syntax) because it needs to look like this:

IIf([TANK DIA] <=149,.16, IIf([TANK DIA] <=200,.20,.25))
 
Back
Top