Cubic Calculation

Seb

Registered User.
Local time
Today, 12:37
Joined
Jun 20, 2006
Messages
55
Hello All

I was wondering how to work around this:

I have some fields in a subform. The fields are pulled from a TBL called tblQuoteItems. The fields in question are: Length, Width, Height, Qty
I then have a formula which is calculated in the query which works out the cubic weight as such:

[Qty]*((([Length]/100)*([Width]/100)*([Height]/100))*333) AS CubicWeight

I need to sum txtCubicweight, which shows the cubicweight value....but all it gives me is an error.
I've read somewhere (probably on here) that access cannot sum a calculated field....Not sure if thats right, but sureley there's a workaround?
Anyways, thanks in advance guys

Seb
 
Did you try summing the field, not the control? By the query, you seem to have a field in the forms recordsource called CubicWeight, and a control on the form called txtCubicWeight. You will need to sum the field, not the control.

=Sum([CubicWeight])
 
Roy. you're a star. So simple, but I couldnt see it!
 
The fields in question are: Length, Width, Height...
If these are, in fact, the actual field names, you might want to consider changing Width and Height, as they are both, I believe, Reserved Words. Sooner or later they'll bring you trouble.
 

Users who are viewing this thread

Back
Top Bottom