Running total on a form

T

T

I have 3 fields in a subform that hours are entered. I
also have one field on the subform that totals all the
hours entered in each of those record. I would like to be
able to have a running total of all hours entered on the
form I have tried the sum function and dsum and can't get
it to work Can someone help ?
T
 
A

Allen Browne

Place a text box in the Form Footer section of your subform.
(See the View menu if you don't have a Form Footer section.)

Set its ControlSource property to:
=Sum(Nz([Hours1]),0) + Nz(Sum([Hours2]),0) + Nz(Sum([Hours3]),0)
replacing the 3 names with your field names.

If you cannnot see this total (e.g. your subform is in Datasheet view), you
can place a text box on the main form and refer to this. If this text box is
called "TotalHours", and your subform control is called "Sub1", the
ControlSource for the text box on the main form would be:
=[Sub1].[Form]![TotalHours]
 

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