Hi,
I have had a look at other posts on which i have attempted to create a IIf statement in a Query but it will not run. It shows a error message saying about the bracketing or a syntex error.
I would be grateful if someone could please have a look at it and lend some knowledge to me as i am a complete newby to them.
First of all let me show what fields i am using from my Table:
Mon_Hrs (this shows hours being worked as shown on rota)
Mon_Reason (this can be either blank or show a 2 digit absence code)
(PH = Part holiday which is rota hours and break time depending on whether full or part time, other reason codes will mean 0 hours worked that day)
MONDAY_HOURS: IIF(IsNull([Mon_Reason]),[Mon_Hrs],IIf([Mon_Reason] = "PH" And [Mon_Hrs] = 7.5,4,IIf([Mon_Reason] = "PH" And [Mon_Hrs] = 5,2.5,0)))
This is my attempt above and i know it will be either something silly or a complete mess and not workable but i would be grateful is someone could help me.
Thanks
I have had a look at other posts on which i have attempted to create a IIf statement in a Query but it will not run. It shows a error message saying about the bracketing or a syntex error.
I would be grateful if someone could please have a look at it and lend some knowledge to me as i am a complete newby to them.
First of all let me show what fields i am using from my Table:
Mon_Hrs (this shows hours being worked as shown on rota)
Mon_Reason (this can be either blank or show a 2 digit absence code)
(PH = Part holiday which is rota hours and break time depending on whether full or part time, other reason codes will mean 0 hours worked that day)
MONDAY_HOURS: IIF(IsNull([Mon_Reason]),[Mon_Hrs],IIf([Mon_Reason] = "PH" And [Mon_Hrs] = 7.5,4,IIf([Mon_Reason] = "PH" And [Mon_Hrs] = 5,2.5,0)))
This is my attempt above and i know it will be either something silly or a complete mess and not workable but i would be grateful is someone could help me.
Thanks