I am writing an Access Report where I need to calculate fields in the query that feeds the report. The query references SQL Server tables. Is there a way to calculate two If statements in one calculated results field? This is what I had tried without luck. If a person has taken a whole day of comp time I get the number of hours taken from one field but if a person takes less than a full day of comp time, the value is stored is another field.
Comp: IIf(([zID]="C" AND [Type]="Leave",[Hrs],0) OR Iif([zID] = "C" AND [TYPE] ="DayOff",[snWkHoursADay],0 ))
Comp: IIf(([zID]="C" AND [Type]="Leave",[Hrs],0) OR Iif([zID] = "C" AND [TYPE] ="DayOff",[snWkHoursADay],0 ))