Summing A Calculated Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that displays all records. Bound field controls are txtTimeIn
& txtTimeOut. An unbound calculated field is txtTimeTotal, which subtracts
txtTimeIn from txtTimeOut and returns the total time for each record. In the
form's footer, I have another unbound calculated field that I'm trying to get
to return the sum of all records' txtTimeTotal calc fields' values, but I
just get #NAME.
TIA.
 
Try by summing the expression used to calculate the total ie in the control
source of the text box in the form footer place the following ' =Sum
(expression used to calculate time total) '
Hope this helps
 
Here's what I've got so far (this is not code):

The txtTimeTotal Control Source property equals
"=[SFI_TimeOut]-[SFI_TimeIn]" 'This is the per record calc - it works.

The txtGrandTotal Control Source property equals "=Sum([txtTimeTotal])"
'This is the 'problem child' calc.

Thanks for your help.
 
Here's what I've got so far (this is not code):

The txtTimeTotal Control Source property equals
"=[SFI_TimeOut]-[SFI_TimeIn]" 'This is the per record calc - it works.

The txtGrandTotal Control Source property equals "=Sum([txtTimeTotal])"
'This is the 'problem child' calc.

Thanks for your help.
= SUM([SFI_TimeOut]-[SFI_TimeIn])
 
Back
Top