Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum up a calculted field

Status
Not open for further replies.

yduckfr

Programmer
Nov 26, 2003
19
0
0
CA
I have in a query a calculated field named dblSubTotal with the calculation "intQuantity * fltCost", then I have a field on my subform with a locked field named txtSubTotal with the control source dblSubTotal, then I tried to create a field in the footer of the subform with the name txtTotalcost with the control source of "=sum ([dblsubtotal])" but it gives me #error

Any help would be greatly appreciated
 
And what about this ?
=Sum([intQuantity] * [fltCost])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
well i tried that one too and it gave me the correct result first, but then i closed the form and when i reopened it it gave me again the same old result #error
 
And this ?
=Sum(Nz([intQuantity],0) * Nz([fltCost],0))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
First of all THANKS for your help

by now i've tried already everything that u can think of but i still had that problem so finaly i figured that i'll try to recalculate that field in the current event of the main form and it works now

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top