Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms Calculations 1

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
In Access 2000 I have a form in which each record has the fields "Units", "UnitPrice" and a control called "TotalPrice".
The control is the formulae "Units" * "UnitPrice"
In the forms footer I have a control "InvoiceValue" which should be the sum of "TotalPrice"
I have tried setting the control of "InvoiceValue" to =Sum([TotalPrice]) or =sum([Units] * [UnitPrice]) but keep getting an error.
What is the correct syntax?
 
Is this a sub-form on another form? Are you using the datasheet mode or continuous mode on a sub-form and then a main form that is totaling items from the sub-form?
Dave
 
Hi Dave
It is not a subform. The form is continuous mode
 
TimTDP
I have found that, with these Sums, if one returns an error, all will return an error in an odd and troublesome way. If you have several experimental additions, delete them, and try something simple:

[tt]=Sum([Units])[/tt]

If that works,

[tt]=Sum([Units] * [UnitPrice])[/tt]

Should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top