Link to home
Create AccountLog in
Avatar of cres1121
cres1121

asked on

Running Total

I have a table called tblpaysummary and a tblpayrollpaying.  I have query that shows me all the records from tblpaysummary where paydate = tblpayrollpaying.  In addition, in the query, I would like to create a running total of all the grossprofits plus the grossprofit by salemen. I have attached a database with my tables and query.
question.accdb
Avatar of Gozreh
Gozreh
Flag of United States of America image

Check this out
question.accdb
Avatar of cres1121
cres1121

ASKER

I need it to add up for the cumulative total everything in the tblpaysummary table versus just what is returned in the query.  So the cumulative total is from the beginning of the year.  As a side when you use dsum does all your criteria have to come from the tblpaysummary or can you reference other fields in your query.
Thanks I have read that many times.  To bad it makes very little sense to me.  I will keep trying
Then does it *have* to be done in a query?
This is ridiculously easy to do in a Report (using the running sum property of a control...)
User generated imagequestion.accdb
I so appreciate it needs to be done in query because I have to determine a commission percentage based on the total grossprofit.  We have three different levels and I want to have the query pick the rate.  >300000 is 12% >600000 is 15% and over 600000 is 18%.
I have to determine a commission percentage based on the total grossprofit.  We have three different levels and I want to have the query pick the rate.  >300000 is 12% >600000 is 15% and over 600000 is 18%.
?
This was not what you stated in your original post.

You asked for this:
I would like to create a running total of all the grossprofits plus the grossprofit by salemen.
...this is what my report displays.
Well I can do the logic if I get the running total in my query.  That is why I can't do it in a report.
ASKER CERTIFIED SOLUTION
Avatar of Gozreh
Gozreh
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
This is exactly what I needed. I so appreciate the help now I have to make it work in my enviorment
I am not getting it.. I get a #error what does that mean other than it is wrong.  I had to do it from a query versus a table but so frustrating.
What is error you are getting ?
Show me the criteria you using in the dsum statement
I took it one variable at a time and finally got more then #error... Thanks again..  Not done but one step I might be back