need help on totaling info on a subform

  • Thread starter Thread starter Morgan
  • Start date Start date
M

Morgan

I need some help on a subform and form, I am trying to
get a DSum Value or Total from all columns from a
subform. the problem is, I don't know how to refer the
Expression to the subform. This is my code.

=IIf(IsNull([client ID]),0,DSum("[Total]","Payment
mgr","[client ID]=" &[client ID]))

The subform that I need to refer to is called " payments
subform " and I don't know how to put that in the
expression.

Thanks in advance for any help.
 
-----Original Message-----
I need some help on a subform and form, I am trying to
get a DSum Value or Total from all columns from a
subform. the problem is, I don't know how to refer the
Expression to the subform. This is my code.

=IIf(IsNull([client ID]),0,DSum("[Total]","Payment
mgr","[client ID]=" &[client ID]))

The subform that I need to refer to is called " payments
subform " and I don't know how to put that in the
expression.

Thanks in advance for any help.
Hi Morgan, instead of using the dsum consider having a
textbox on the subform that has a simple
=sum([field])
control source. This textbox can have visible set to
false. Then have a textbox on the main form refer to the
subform control
=subformcontrol.control
.. Two advantages... 1. simple calculation and reference;
2. don't have to force recalculation when moving from
record to record.

Luck
Jonathan
 
Back
Top