I have a form to keep record of sick leave and Holidays taken, fields [SickLeave]& [HolidayTaken], both Date Type is Y/N, I have a text box [SickDays], the control source =IIf([SickLeave]=True,DateDiff("d",[Date1],[Date2]),0)
[Holidays], the control source =IIf([HolidayTaken]=True,DateDiff("d",[Date1],[Date2]),0)
The above works good.
Then, I want to caculate the total of them seperatedly. Then I use text box[TotalSick]=Sum([SickDays]) and [TotalHoliday]=Sum([Holidays]). But they do not work at all.
What is my mistake?
Thank you so much for your kind help.
[Holidays], the control source =IIf([HolidayTaken]=True,DateDiff("d",[Date1],[Date2]),0)
The above works good.
Then, I want to caculate the total of them seperatedly. Then I use text box[TotalSick]=Sum([SickDays]) and [TotalHoliday]=Sum([Holidays]). But they do not work at all.
What is my mistake?
Thank you so much for your kind help.