IIF equation

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
 
K

Ken Snell [MVP]

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))
 

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

Similar Threads


Top