C
Chuck F via AccessMonster.com
Hi There! Any MVP's that would like to help out with this "iif" clause I'd
much appreciate it. I have a bunch of fields within my table one of which
denotes the time. I want to take a certain range of time and assign it to a
specific daypart such as EM, DA, EF, PR, LN, or ON. Below is what I am
currently doing. It works for the most part but for some reason it's not
working for the times from 9:00 AM-1:59 PM.
daypart: IIf(TimeValue([time]) Between "6:00 AM" And "9:59 AM","EM",IIf
(TimeValue([time]) Between "10:00 AM" And "2:59 PM","DA",IIf(TimeValue([time])
Between "3:00 PM" And "6:59 PM","EF",IIf(TimeValue([time]) Between "7:00 PM"
And "10:59 PM","PR",IIf(TimeValue([time]) Between "11:00 PM" And "1:59 AM",
"LN",IIf(TimeValue([time]) Between "2:00 AM" And "5:59 AM","ON","ERROR"))))))
Any suggestions would be much appreciated.
Thanks,
Chuck
much appreciate it. I have a bunch of fields within my table one of which
denotes the time. I want to take a certain range of time and assign it to a
specific daypart such as EM, DA, EF, PR, LN, or ON. Below is what I am
currently doing. It works for the most part but for some reason it's not
working for the times from 9:00 AM-1:59 PM.
daypart: IIf(TimeValue([time]) Between "6:00 AM" And "9:59 AM","EM",IIf
(TimeValue([time]) Between "10:00 AM" And "2:59 PM","DA",IIf(TimeValue([time])
Between "3:00 PM" And "6:59 PM","EF",IIf(TimeValue([time]) Between "7:00 PM"
And "10:59 PM","PR",IIf(TimeValue([time]) Between "11:00 PM" And "1:59 AM",
"LN",IIf(TimeValue([time]) Between "2:00 AM" And "5:59 AM","ON","ERROR"))))))
Any suggestions would be much appreciated.
Thanks,
Chuck