In a form I have a control that references a total from a subform. The controlsources of the total is:
=Sum(IIf([dept]="DMH" And [Shift]=1,[Hoursdown]*0.938,IIf([dept]="BCDMH" And [shift]=1,[hoursdown],0)))
The records on the subform are for 3 shifts and this gives me the total for shift 1 only. On my main form I have a control that uses this total for calculations and its controlsources is:
=nz(DrysideAffectedsubform.Form!affectedhourstotal1,0)
Everyting works great on the form, but when I save the control in my save routine, it saves a zero everytime. If I put a break in the code anywhere in that routine and then continue it, it will save the correct number. Any thoughts?
Thanks,
Tom
=Sum(IIf([dept]="DMH" And [Shift]=1,[Hoursdown]*0.938,IIf([dept]="BCDMH" And [shift]=1,[hoursdown],0)))
The records on the subform are for 3 shifts and this gives me the total for shift 1 only. On my main form I have a control that uses this total for calculations and its controlsources is:
=nz(DrysideAffectedsubform.Form!affectedhourstotal1,0)
Everyting works great on the form, but when I save the control in my save routine, it saves a zero everytime. If I put a break in the code anywhere in that routine and then continue it, it will save the correct number. Any thoughts?
Thanks,
Tom