PDA

View Full Version : Solved: alternat for subform summing, "=sum([])"



Trevor
02-06-2008, 09:56 PM
I am experiencing an #error when using "=Sum([Amount to pay])" as the controle souce for a subform unbound txtbox [subformtotal] to total all amounts in [Amount to pay], and I read a post at http://www.pcreview.co.uk/forums/thread-3394799.php that said that sum, count, etc can also cause the #error in the textbox so I removed the =sum() and left [subformtotal] text box control source as "=[amount to pay]" to test this theory out and that seems to be what is causing the error but I don't know any allternitive to summing subform amounts, can any one help, I have tried attaching my db but the upload fails they file is only 44kb ,
thanks for any help

Oorang
02-08-2008, 12:20 AM
What happens if you use:

=Sum(nz([Amount to pay],0)) Instead?

Also make sure you don't have any controls fields also named "Amount To Pay".

Trevor
02-08-2008, 01:42 AM
Thanks for your sugestion but it didn't work I have attached my DB, I am now trying to sum a [total],
note [Subform Tatal] is only above the footer of the subform for testing.

Trevor
02-09-2008, 06:32 PM
: pray2: : pray2: attached is my revised db and it stays at 0 when I try to sum field that is summing is [total price] it is summing [price]

Trevor
02-09-2008, 10:32 PM
I don't know why acces has problems with subforms but to fix it I had to re-design my subform from scatch, access doesn't seem to like mathmatical additions after the origonal save(at least for me) and still I couldn't just use a simple =sum[(Controle]), I have to use =Sum([Amount to pay] *[QuantityNum])

Trevor
02-09-2008, 10:33 PM
OOrang, thanks for your help