Running Totals For Each Record in a Form

R

Reese

I built a "Form" to enter records into my database. Each record has multiple
income source fields. I'm trying to put a field in my "Form" that adds the
total of income from each field and shows it as a running total, (specific to
that record, not the whole dataset), and shows it on the Form as I'm entering
the information.
 
A

Al Campagna

Reese,
If each record has an incrementing Key Field value, like
a normal autonumber field (like OrderID), or a field like
DOC (Date of Creation), and those records are sorted that way,
then...
You can add a calculated text control with...

=DSum("[Freight]","Orders", "[OrderID] <= Forms![Form1]![OrderID]")

See...
http://support.microsoft.com/kb/103183

--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
K

KARL DEWEY

If I understand correctly you want all fields of a single records totaled.
To do this add a text box to the form and in the ControlSource enter this
using your field names.
= [Field1] + [Field2] + [Field3] + [Field4] + [Field5]

This will work if your fields are datatype number.
 
J

John W. Vinson

I built a "Form" to enter records into my database. Each record has multiple
income source fields. I'm trying to put a field in my "Form" that adds the
total of income from each field and shows it as a running total, (specific to
that record, not the whole dataset), and shows it on the Form as I'm entering
the information.

If you have a Table with five fields for different income sources... your
table design is incorrect and is making it difficult for you. If you have a
one (person) to many (input sources) relationship, it's probably much better
to model it as a one to many relationship - with a People table (with no
income data) related one to many to an Income table, with fields for the
personID, the source of the income, and an income amount.

With this design you can use an income Subform on the people form, and put a
textbox on the subform's Footer with a control source like

=Sum([IncomeAmount])

to dynamically display the current total income.
 

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