View Full Version : Nested IIF question


BukHix
03-30-2007, 09:31 AM
I have a nested IIF that I cannot get figured out. This is what I have so far:

Hours: IIf([Dept]="10",55,Format(IIf([EorDCode]=" 1",[Regular]/60,[OT]/60),"Fixed"))

The problem is that I need another IIF to differentiate between Regular and Overtime. It needs to do this.

If Dept = 10 Then
55 Regular Hours and 0 Ovettime hours
Else
Format(IIf([EorDCode]=" 1",[Regular]/60,[OT]/60),"Fixed"))

BukHix
03-30-2007, 10:09 AM
I got it:

Hours: IIf([EorDCode]=" 1",IIf([Dept]="10",55,[Regular]/60),IIf([Dept]=10,0,[OT]/60))