View Full Version : Nested IF statement


Tuili63
02-05-2002, 12:08 PM
I have been unable to get Access to accept my nested If statement in a query. I have recently begun using Access2000. Is there something new with this version? This is the statment that is currently not being accepted.

Expr1: IF([tbl Emp types_ID]="W2S",([DyPay]*1.18),IF([tbl Emp types_ID]="W2H",([DyPay]*1.12),[DyPay]))

I am getting Undefined function 'IF' in expression when I try to run the query.

Any help would be appreciated.

David R
02-05-2002, 12:10 PM
IF is VBA. Use IIF.

Tuili63
02-05-2002, 12:14 PM
thank you. I tried it and it accepted it. But when I run it I get #Error in that field. http://www.access-programmers.co.uk/ubb/frown.gif Any suggestions?

Tuili63
02-05-2002, 12:47 PM
I figured it out. Thank you