PDA

View Full Version : adding values from txtbox and



sindhuja
07-25-2008, 09:06 PM
hi,

i need to sum up the values from differennt textbox in a form and the result to the value of another textbox. Also from the total i need to calculate the average of particular item.

for ex, i have 5 textbox txtpen, txtpencil, txteraser, txtsketch, txtpins. now i want the sum of all these stationeires in txtbox txtsationerytot.

Also the total of txtpen, txtpen1, txtpen2 in a txtpentot for which i have to find the average (ie either increase or decrease of sales (pen) compared to yesterday).

any help willbe appreciated...

-sindhuja

OBP
07-26-2008, 04:00 AM
If they are all seperate textboxes then you need to use this in the Total Field
= [textbox] + [txtpen] + [txtpencil] + [txteraser] + [txtsketch] + [txtpins]
This calculation can also be carried out in a query.
It does suggest however that your table design is not normal. Those items would normally be individual records in a subform rather than individual field names.

sindhuja
07-27-2008, 05:06 PM
Thanks a lot !

-Sindhuja