A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Running Totals For Each Record in a Form



 
 
Thread Tools Display Modes
  #1  
Old January 14th, 2010, 06:15 PM posted to microsoft.public.access.forms
Reese
external usenet poster
 
Posts: 43
Default Running Totals For Each Record in a Form

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.
  #2  
Old January 14th, 2010, 09:00 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Running Totals For Each Record in a Form

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

"Reese" wrote in message
...
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.



  #3  
Old January 15th, 2010, 08:55 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Running Totals For Each Record in a Form

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.

--
Build a little, test a little.


"Reese" wrote:

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.

  #4  
Old January 15th, 2010, 09:45 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Running Totals For Each Record in a Form

On Thu, 14 Jan 2010 10:15:01 -0800, Reese
wrote:

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

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.