Caculate Control Problem

xxlu

Registered User.
Local time
Today, 08:45
Joined
Jun 28, 2001
Messages
12
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.
 
ur references is okay but make sure you put them in the form header/footer and not on the page header/footer of your form.
 

Users who are viewing this thread

Back
Top Bottom