Sum of a field from Crosstab Query

  • Thread starter Thread starter DZ
  • Start date Start date
D

DZ

Hi

I have a form whose record source is a Crosstable query.

Several columns of data in the form (and underlying CrossTab Query ) are
numeric and in the form footer I have text box, txtTotal, with
"= Sum([txtNumericCol1])" as the control source.

txtNumericCol1 is a text box in the Detail section whose ControlSource is a
numeric field from the underlying CrossTab Query.

txtTotal displays #Error.

But...If I set txtTotal control source to simply "= [txtNumericCol1]", then
txtTotal displays the correct value from the current record.

I want txtTotal to display the total but I'm getting an error.

I tried using DomaineAggregate functions and I am able to get the totals
that way but there is alot of data and they are extremely low (They take 15
to 20 second to display the total)

Thanks
I will credit any helpful responses
 
Hi DZ

Instead of using the control name (txtNumericCol1) in the Sum expression,
use the actual field name that is the ControlSource of txtNumericCol1.
 
Yws. That worked ! Great

I always thought that you were supposed to refer to controls when doing
calculations from text boxes on forms and reports ???

Any enlightenment on this would be appreciated
 
Back
Top