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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|