advanced microsoft access courses in london - cumulative total query

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » advanced microsoft access courses in london - Cumulative Total Query

advanced microsoft access courses in london - Cumulative Total Query

resolvedResolved · Low Priority · Version Standard

Caroline has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Access Intermediate course

Cumulative Total Query

Hi,

I am trying to produce a cumulative total in a query. I am using the DSum function and I can get this to work if I want to compare the ID number and add up totals in this order, but what I really need is to be able to compare dates and add up values in order of the date the action is expected to be completed:

I have three columns in this query - Value (the cost that I want to produce my cumulative total from), the cost ID (the primany key), and the expected cost date (the date the cost is due to come in)

I am hoping to use this query to produce a graph in a report to show how the costs spent over time.

This is the expresion i'm using:

Total Cost: DSum("[Value]","[CostsTable]","[Expected Cost Date] >=" & [InstallTable]![Circuit Expected Live Date])

If I exchange Expected Cost Date with the Cost ID then I can get this to add up, although not in the order I'm hoping to get. But when I use the Expected Cost Date I get blank cells.

Please can you let me know what I am doing wrong with this expresion?

Many thanks,
Caroline

RE: Cumulative Total Query

make sure it is simular to this

"'[Expected Cost Date]'">=

RE: Cumulative Total Query

Hi Garry,
Thank you but I still cannot get an answer from this.. Could you write out the whole formula for me, please?
Thanks!
Caroline

RE: Cumulative Total Query

Hi Caroline,

I think what he meant was, instead of your original:
DSum("[Value]","[CostsTable]","[Expected Cost Date] >=" & [InstallTable]![Circuit Expected Live Date])

Change it to:
DSum("[Value]","[CostsTable]","'[Expected Cost Date]'">= & [InstallTable]![Circuit Expected Live Date])

Your code had the double quote after the greater-than-or-equal-to sign.

He also seems to have added single quotes in between the double quotes and square brackets... that may be important too.

Let us know how you go.

Regards, Rich


 

Access tip:

Remove spaces in a table

If you have a table that has too many space marks littered around, you can create a update query and use the trim function to get rid of any excess space marks

View all Access hints and tips


Server loaded in 0.08 secs.