By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.

Running Totals

P: 3
Hey guys, I've been reading these forums for more than a year now, and usually someone has asked the question before me, so thanks!

But now i have a different problem I could use some help with.

I have table that stores

Unit # integer
Unit Type text
Effective date (date of unit value)
Unit Price double (this is not a currency as units are priced with up to 8 decimals)
TT text (Transaction type, has 2 values either AV price or ID for dividend)

Ok, using parameters, I want to be able to enter a Unit, Unit Type, and Effective, and also an Amount in $.

What I want as out put is the running value in units of what the original amount is from the given date to the present.

e.i.
Unit = 090
Unit Type = FV
Effective = Feb 1 2006
Amount = 1000

As the fund price flucuates I want the amount to update through the datasheet view.

If I can get this to work, I'll ask about how I can add the Dividend's which are calculated on the amount of units.

Thanks very much for any help you can give.
Feb 23 '08 #1
Share this Question
Share on Google+
4 Replies


puppydogbuddy
Expert 100+
P: 1,923
Hey guys, I've been reading these forums for more than a year now, and usually someone has asked the question before me, so thanks!

But now i have a different problem I could use some help with.

I have table that stores

Unit # integer
Unit Type text
Effective date (date of unit value)
Unit Price double (this is not a currency as units are priced with up to 8 decimals)
TT text (Transaction type, has 2 values either AV price or ID for dividend)

Ok, using parameters, I want to be able to enter a Unit, Unit Type, and Effective, and also an Amount in $.

What I want as out put is the running value in units of what the original amount is from the given date to the present.

e.i.
Unit = 090
Unit Type = FV
Effective = Feb 1 2006
Amount = 1000

As the fund price flucuates I want the amount to update through the datasheet view.

If I can get this to work, I'll ask about how I can add the Dividend's which are calculated on the amount of units.

Thanks very much for any help you can give.
See this link (scroll down to the topic "Calculating running sums (cumulative totals)"):

http://office.microsoft.com/en-us/ac...224441033.aspx
Feb 23 '08 #2

P: 3
OK I see how that could work when my table stores the amount of units, or a dollar amount. However... this is a thoretical calculator let me explain in more detail

I have stock prices, these stocks pay infrewuent dividends.
I want to be able to query the database as such

I enter $1000 for stock A with a date of Feb 2 2006.

Using the fund price on the original trade date, I will get a number of shares.
The number of shares won't flucuate after this point, only it's value as the price of the share goes up and down. This is the first problem.

When dividends are paid out, they are paid as a certain amount per share owned. But the price stock is updated the same day as the dividend is paid out.
Essentially I don't care about price flucuations, only that dividends are paid out a rate of the shares owned and that rate is the Stock Price of the day that the dividend is paid out.

Also, this table I have I have a field TT for transaction type. AV= stock price and ID = dividend.
Feb 24 '08 #3

puppydogbuddy
Expert 100+
P: 1,923
OK I see how that could work when my table stores the amount of units, or a dollar amount. However... this is a thoretical calculator let me explain in more detail

I have stock prices, these stocks pay infrewuent dividends.
I want to be able to query the database as such

I enter $1000 for stock A with a date of Feb 2 2006.

Using the fund price on the original trade date, I will get a number of shares.
The number of shares won't flucuate after this point, only it's value as the price of the share goes up and down. This is the first problem.

When dividends are paid out, they are paid as a certain amount per share owned. But the price stock is updated the same day as the dividend is paid out.
Essentially I don't care about price flucuations, only that dividends are paid out a rate of the shares owned and that rate is the Stock Price of the day that the dividend is paid out.

Also, this table I have I have a field TT for transaction type. AV= stock price and ID = dividend.
Try using a form on which you've placed unbound controls for each of the investment parameters that you want running totals for. Then use an update query to run through your transaction table and accumulate and post the totals for each/all of your parameters.
Feb 24 '08 #4

puppydogbuddy
Expert 100+
P: 1,923
Try using a form on which you've placed unbound controls for each of the investment parameters that you want running totals for. Then use an update query to run through your transaction table and accumulate and post the totals for each/all of your parameters.
My apologies.. I wasn't thinking...I should have said use a select "totals" query to run thru your transaction table and accumulate the totals of each one of your parameters and either use the query as the data source for a form or report.

A good tutorial reference source that will show you how to do a totals query and other advanced queries is shown at the following link:
http://www.fmsinc.com/tpapers/querie...lect%20Queries

Hope this helps.
Feb 25 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.