PDA

View Full Version : Solved: Alternat for =sum, =sumproduct for subform



Trevor
02-06-2008, 10:54 PM
I have a subform with a textbox [Amount to pay] I want to total and I tded using =sum([Amount to pay]) , and have also tried =sumproduct([Amount to pay]) in textbox [total sub] and both give me and both methods give me an #error in [total sub]. I read a post athttp://www.pcreview.co.uk/forums/thread-3394799.php (http://www.pcreview.co.uk/forums/thread-3394799.php)
stateing that function sum,min,max as a controlsource can cause that error as wel as a textbox that is refuring to itself in the controle source argument.
does anyone know of an alturnate way to sum the values in the subform,
I have also tried placing the controle with the same argument on the main form to retrieve to total of [amount to pay] and I get the same #error there as well, I have tried attaching my db but the upload fails it's within the max size alowed (44kb), don't know why that doesn't work.
so I would appreciate any help to sum these vales that are in the subform [bill select subform].

OBP
02-07-2008, 04:40 AM
Trevor, is your database Zipped, the forum only accepts zipped Access files.

Trevor
02-07-2008, 09:53 AM
yes I ud winrar and selected zipintead of rar

Trevor
02-07-2008, 12:44 PM
Upload of db fails even as a Zip file size 44kb

Trevor
02-07-2008, 03:13 PM
summing from a subform: =Sum([bill Select Subform].[Form]![Total]) as a controle source returns #error in the textbox controle but =Sum[bill Select Subform].[Form]![Total] returns the value of the first field [Total]

Trevor
02-08-2008, 01:49 AM
I have finaly goten my db to attach, check out http://www.vbaexpress.com/forum/showthread.php?t=17587

Trevor
02-09-2008, 06:13 PM
I re desinged my form and now it will not sum the field stays "0" any Ideas

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

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