Text Box Summing

Kevin Field

Registered User.
Local time
Today, 10:48
Joined
May 26, 2010
Messages
35
Hi all,

Is it possible to sub text boxes on a form?

Basically, i have a purchase orders form and the sub total of each item is displayed at the end of the row. Obviously this is the item price X the quantity.

However, i have a grand total text box as well which needs to be populated. Ive thought this through and though its easy just to code it as [total1]+[total2] etc what happens if there is just one item to order? It wont show.

I either needs to work out a way of adding them all up (regardless of how many items) or a expression to let me include just the first item if there is only one on the purchase order.

Hope this is clear...

HELP!
 
Sounds like your po line items need to be in a subform?
 
In the form footer put a Text box with the Record Source;
Code:
=Sum([Price]*[Quantity])
 
The field to be totalled needs to be created in the Record Source query of the form.
Then use =Sum(fieldname) as the Control Source of the text box.
 

Users who are viewing this thread

Back
Top Bottom