jpkeller55
New member
- Local time
- Yesterday, 20:26
- Joined
- May 10, 2012
- Messages
- 9
[FONT="]I am trying to write an IIf statement that considers multiple criteria to return a value of y or n based on day of week and time of day to determine if an event would be considered "on-call". There are multiple facilities (three) and the rules are slightly different for each each facility (branch). For all events occurring on a Sat or Sun (DayOfWeek = 1 or 7) and regardless of what facility, the event would be considered "on-call"
. For facilities #1 and #20, an event after 17:59:59 during the week (DayOfWeek = 2,3,4,5,6) would be considered "on-call". For facilities #21 an event after 15:59:59 during the week (DayOfWeek = 2,3,4,5,6 "on-call
.
Attached is a screen shot of sample data and how the last column [OnCall] should work. Below is the start of my attempt to get the code to work.
[/FONT]
Appreciate any help...Thanks, Jim


Attached is a screen shot of sample data and how the last column [OnCall] should work. Below is the start of my attempt to get the code to work.
[/FONT]
Code:
[FONT="][FONT="]ONCALL: IIf([OrderDayOfWeek]=1 Or [OrderDayOfWeek]=7,"y","n") [/FONT][/FONT]