Chris
Chris

Reputation: 1

New to Access, need assistance with function

In Access, I need to update prices from a table from 2 different columns. Some are zero, but I need to pull the cell that has the price. I'm trying to pull Price A or B into Base in my query.

Base: IIf([NEGITS]>0=[NEGITS][ITSMULT]>0=[ITSMULT])

I keep getting invalid syntax error. Can you please help me find the correct function to use?

Thank you so much!

Base: IIf([NEGITS]>0=[NEGITS][ITSMULT]>0=[ITSMULT]) - invalid snytax error

Expr1: IIf([NEGITS]>0=[NEGITS],[ITSMULT]>0=[ITSMULT]) Syntax error (comma)

Expr1: IIf([NEGITS]>0=[NEGITS][ITSMULT]>0=[ITSMULT]) invalid snytax error

Base: IIf([NEGITS]>0=NEGITS][ITSMULT>0=[ITSMULT]) invalid snytax error

Upvotes: 0

Views: 22

Answers (1)

Gustav
Gustav

Reputation: 56026

Try this:

Base: IIf([NEGITS]>0,[NEGITS],IIf([ITSMULT]>0,[ITSMULT],0)) 

Upvotes: 0

Related Questions