Running Total on Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have designed a form on which is recorded an amount received The form also
includes fields where the user enters a breakdown of the amount received. I
would like to include a running total, so that the user can see whether the
breakdown entered on the form equals the amount received, before the relevant
record is created.

How do I include my running total?
 
If your fields have different names, you would make a textbox and put
=[Field1] + [Field2] + [Field3] etc in the control source.

If your fields have the same name, like in a subform for example, you
can put
=Sum([YourFieldName]) in the control source or
=Sum(Forms!MainFormName!SubformName!FieldName)

Hope that helps!
 
Don't forget to refresh the control on the AfterUpdate property, or the
results won't be dynamic.
 
Could you please remind me how to refresh the control?
--
Thanks in anticipation.


ManningFan said:
Don't forget to refresh the control on the AfterUpdate property, or the
results won't be dynamic.

Jeff said:
If your fields have different names, you would make a textbox and put
=[Field1] + [Field2] + [Field3] etc in the control source.

If your fields have the same name, like in a subform for example, you
can put
=Sum([YourFieldName]) in the control source or
=Sum(Forms!MainFormName!SubformName!FieldName)

Hope that helps!
 
Sorry to be a little vague on this - I obviously do not have your expertise.

a. Presumably I include this command in the after update event of each of
the fields that show the breakdown of the amount entered.
b. If so, can the -ControlName.Refresh code be in a macro that is invoked as
a result of this event or do I have to construct an even procedure (which is
where I do not have a great deal of experience)
-
Thanks in anticipation.
 
Rillo said:
Could you please remind me how to refresh the control?

I'm not aware of such method for controls in the versions I work with.
If it doesn't update as it should, you might try issuing a

me.recalc

in the after update event of the control on which this calculation
depends. This should recalculate all calculated controls on the form.
 
Back
Top