MLink Posted September 12, 2007 Posted September 12, 2007 Hello all. I have a table called EXPENSES. Each entry in this table has a Project Code, a date, and an amount. I'm really stuck. Is there a way for each entry in this table to have access to a summary of the amounts for all the other entries in that table that: a) Have the same Project Code, and; : Have a date BEFORE the date of that entry in the table. In other words each expense should be able to see the total of all the expenses relating to that project code that have come before it. Effectively, each expense has a running total of previous expenses against that project code. Is this possible? If so, how does one acheive it? If I could somehow use a while/for loop I'm sure I could do it, but I'm hoping there's a function to acheive my aim. All responses appreciated. Cheers.
Søren Dyhr Posted September 12, 2007 Posted September 12, 2007 My take at it, is that in order to scale should it be done with autoenter's - Unstored Sum( 's slows considerably down when the number of records grows. This principle which I have instated in my template's validations is nowhere new to mankind. Luca Di Pacioli a Franciscan friar adapted in 1494 what the Arab's have done for centuries before Columbus discovered the Americas! Here isn't it the demand for two accounts, which is the focus - but instead the prevention of tampering with previous records of expenses ... the demand to do the books in ink. If an error is committed should it be counter posted... --sd Expenses.zip
MLink Posted September 13, 2007 Author Posted September 13, 2007 Søren! You're a lifesaver. I will try and apply this solution and see how it goes. Thankyou so very much.
Recommended Posts
This topic is 6616 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now