Summing A Calculated Field

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.
 
C

Chris B via AccessMonster.com

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
 
G

Guest

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.
 
F

fredg

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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top