Report Long Calculation for Mulitple Records

james_IT

Registered User.
Local time
Today, 07:48
Joined
Jul 5, 2006
Messages
208
Hi

I have a report with a few hidden textboxes because they are controls for a long calculation. However in the report every record shows the same calculation when it shouldnt...

Im trying to create a report for multiple records.

My calculated textbox is:

=Sum((([txtLFeet]*0.3048)+([txtLInches]/12*0.3048))*(([txtWFeet]*0.3048)+([txtWInches]/12*0.3048))*[CV Code])

I know the calculation is correct because it works in a report based on ONE RECORD however it just repeats the same answer for all records...

Any ideas?
 
Access is working exactly as designed.
Calculated controls use the values of the current record.

You need to derive your calculations as fields inside the record source query using the values from the table fields rather than values from bound controls on the report.
 
Access is working exactly as designed.
Calculated controls use the values of the current record.

You need to derive your calculations as fields inside the record source query using the values from the table fields rather than values from bound controls on the form.

So my calculation need to go in the query? Where and how do i insert it?
 
Access is working exactly as designed.
Calculated controls use the values of the current record.

You need to derive your calculations as fields inside the record source query using the values from the table fields rather than values from bound controls on the form.

So my calculation need to go in the query? Where and how do i insert it?
 
Type the expression into the field box of the query designer.
Change parts that refer to control names to refer directly to the table.field names in the underlying tables.

This will make another field in the query called Expr1.
You can edit this name.

Then you can insert a bound control on the report and set its Record Source to the new field.
 
=Sum((([txtLFeet]*0.3048)+([txtLInches]/12*0.3048))*(([txtWFeet]*0.3048)+([txtWInches]/12*0.3048))*[CV Code])

Should be
=([txtLFeet]*0.3048)+([txtLInches]/12*0.3048)*([txtWFeet]*0.3048)+([txtWInches]/12*0.3048)*[CV Code])
 

Users who are viewing this thread

Back
Top Bottom