Question : Sum of a calculated field

On a tabular form, I have UnitPrice and Qty, 2 text boxes. User inputs Qty. Another text box txtExtension = [UnitPrice]*[Qty]. In the form footer, I put a txtTotalPrice field and want it calculate the total of all the Extension. So I put in "=Sum([txtExtension])", but it gives me an error.
Is there anything wrong?

Answer : Sum of a calculated field

Another option is to do the calculation in the query, not in the textbox.  Add a calculated field to your RecordSource query:

ExtendedPrice: UnitPrice * Qty

Then you can bind this field to txtExtension, and use =Sum(ExtendedPrice) in your total textbox.

You might also notice that your form displays faster.

(no points requested)

--
Graham

Random Solutions  
 
programming4us programming4us