Solved

Storing cumulative data

Posted on 2008-10-02
6
219 Views
Last Modified: 2013-11-28
how do you create a "bucket" for numbers and store them in a seperate field in a query?  Example: I have detail records that have data stored in a field called Accural 1which has the following data in detail records:Record 1= .0245, Record 2 = .0358, Recordl 3 = .458.  The bucket or new field would show the total or  .5183 in this example.
0
Comment
Question by:mogurek
  • 2
6 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 168 total points
ID: 22630680
To get sum, you can just do this:
SELECT SUM([Accrual 1]) AS TotalAccural

FROM yourTableName

Open in new window

0
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 166 total points
ID: 22630683
it is not advisable to store calculated values in a table.

yuo can always get the total value by using sum or dsum functions

in a query assuming you have a recordId and Accural 1 fields

select recordID, sum([Accural 1]) as TotalAccural
group by recordID
0
 
LVL 9

Assisted Solution

by:jamesgu
jamesgu earned 166 total points
ID: 22630688

select Accural_1, (select sum(Accural_1) from table_name) as bucket
from table_name
0
 
LVL 9

Expert Comment

by:jamesgu
ID: 22630701
agree with capricorn1:

if one of the value is changed, the sum value will become incorrect,
or you may have to update the sum value as well.


0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now