Subform control is zero when saving

taw

Registered User.
Local time
Today, 13:21
Joined
Nov 21, 2002
Messages
34
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
 
Figured it out - I had a routine to requery everything that was running before it got to the save routine.
 

Users who are viewing this thread

Back
Top Bottom