#Error when summing in Form

I

iamnu

I add a NEW control to the Footer of a Subform with a Control Source
as follows: =([AmtBilled]). This will give me a value from a record
of the Detail section of the same Subform.

If I change the Control Source to =Sum([AmtBilled]), I get #Error.

All of my controls that contain the Sum function are NOW giving me
this #Error. I made this to happen with some change I have made, but
I can't figure out what I have done to cause this.

Can someone point me in the direction to solving this problem?

Thanks...
 
D

Dorian

You need to sum by control name not by column name.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
L

Linq Adams via AccessMonster.com

Is [AmtBilled] a calculated field? You cannot run an aggregate function like
SUM against a calculated field. You have to use the expression used for the
calculation.

For instance, if

[AmtBilled] = [Units] * [UnitCost]

instead of

Sum([[AmtBilled])

you'd use

Sum([Units] * [UnitCost])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top