• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Any MS Access gurus here?

Doomer

Diamond Member
Dec 5, 1999
3,721
0
0
I need to sum a field whose control source is

=IIf([Double]=True,[Weight]+[Weight],[Weight])*([Length])*[Count2]

This statement works fine. I just can't figure out how to sum this field. I've tried referencing this statement instead of the name of the field but that don't work. I get #error.

TIA
 

Doomer

Diamond Member
Dec 5, 1999
3,721
0
0
It's in a field on a form. It's the control source. The name of the field is TotalWeight.
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,003
126
What exactly are you trying to sum? The [TotalWeight] value of all of the values in the form's recordset?

In that case you'll probably need to put the sum value in the form's header or footer.
 

Doomer

Diamond Member
Dec 5, 1999
3,721
0
0
Yep. That's exactly what I'm trying to do. It must have something to do with the IIf statement. I can sub a Dlookup statement in it's place and it works. :(

 

KLin

Lifer
Feb 29, 2000
30,433
747
126
Just add a detail footer to the form and put in a label that says something like Sum([TotalWeight])