[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1321
  • Last Modified:

IF Function in an Access Query

Hi, I'd really appreciate help with this Access 2003 problem:

I am trying to write an Expression in a Query that is essentially an IF function.

In plain English it would be:  The field is called BuyGST and it is to calculate:  If there is a Y in a field called GSTRegistered, then the answer is to be BuyCost field * 1.1, else if not true then the answer is to be 0

In Excel it would be =IF(A1="Y",B1*1.1,0)

In Access I wrote the expression as: BuyGST: IF([GSTRegistered]="Y",[BuyCost]*1.1,0)

but it tells me Undefined function 'IF' in expression

Thanks
0
GAILBAKER
Asked:
GAILBAKER
1 Solution
 
Ryan ChongCommented:
try use IIF instead? like:

BuyGST: IIF([GSTRegistered]="Y",[BuyCost]*1.1,0)
0
 
GAILBAKERAuthor Commented:
Trust Microsoft to change the name of the Function - many thanks!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now