need help on totaling info on a subform

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.
 
J

Jonathan Parminter

-----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
 

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

Similar Threads


Top