Hello!
How can i make SUM of value that is calculated in form not in query?
Thanks
Hello!
How can i make SUM of value that is calculated in form not in query?
Thanks
In the form footer:
=Sum(FieldName)
presuming the field is in the form's record source.
Or if you mean on the form is
=Price * Quantity
and you want to sum it,
=Sum(Price * Quantity)
In query i have:
Price: [Quantity] * [SellingPrice]
In form:
Tax: =[Price] * [TaxRate]/100
SubTotal: =[Tax] + [Price]
And i need a to make Total: SUM[SubTotal] but it doesnt work...
As mentioned in post 3, you can sum the calculation. Or you can move the other calculations out to the query.
Yes i've tried that but i get #Error
Well, not seeing exactly what you tried, I can only speculate. Make sure there isn't a textbox with the same name as a field.
I tried this:
=SUM([Tax]*[Price])
and
=SUM([SubTotal])
both options give me error
Of course, both try to sum a calculated control. I'd move it all to the query, but this should work:
=Sum(([Price] * [TaxRate]/100) + [Price])
I'd probably add the Round() function in there.
I've attached database so you can check and maybe fix this beacuse it's still error...
just open up ServiceParts form...
Attachment 37972
TaxRate is in cboMaterial (it's not same for all parts)... SellingPrice is in both tables beacuse at first i didn't know how to fix problem when for example price for brakes changed from 20€ to 25€ and when i changed price in Material table than it was changed also in all previous services so that's why SellingPrice in both tables, now when i change price all previous services still have same one...