Running Sum in Query Problem

Dumbfounded

Registered User.
Local time
Today, 04:27
Joined
Jul 26, 2007
Messages
92
Hi Guys,

I'm doing a database for a client and I'm stuck on a graph (or rather having an overall total on the graph). I've done everything in the query but I do need a running sum for this. I've explored my books, looked on the help, checked out various past posts and I seem to be missing something.

I did find a helpful post which solved someone's problem and I have posted the code below. because everytime I try to come out of it (and I've retyped it a number of times) it keeps coming back with "Syntax error in string in query expression blah blah blah".

Code that I have is:-

SELECT Code, QC4RS, PODate, Net,
val(DSum("Net", "Costings Query", "Code"= '" &Code&"' and QC4RS =" & QC4RS & "and PODate <=# "& PODate&"#"))AS RunningSum
FROM [Costings Query];

What I want ultimately is a running sum of the Net Cost for the product code so that it gives me an overall total on the graph. It's now been over 8 hours that I've struggled with this and I'd really appreciate a fresh pair of eyes to tell me what I'm not seeing.

Thanks in advance.

Donna x :mad:
 
Hi Donna,

How are things?

If you would like me to take a look, send your app across to me and i will see what i can do.

Garry
 
Bump.

Ive got no answer for this one,
Has anyone else got any experience with graphs who can help.

Garry
 
Hi Guys,
.

I did find a helpful post which solved someone's problem and I have posted the code below. because everytime I try to come out of it (and I've retyped it a number of times) it keeps coming back with "Syntax error in string in query expression blah blah blah".

Code that I have is:-

SELECT Code, QC4RS, PODate, Net,
val(DSum("Net", "Costings Query", "Code"= '" &Code&"' and QC4RS =" & QC4RS & "and PODate <=# "& PODate&"#"))AS RunningSum
FROM [Costings Query];

Donna x :mad:

The condition part of your DSum looks worng. Try this and see if that helps.


Code:
val(DSum("Net", "Costings Query", "Code= '" & Code & "' and QC4RS = " & QC4RS & "and PODate <= # "& PODate & "#"))AS RunningSum
 
Thanks for all your help on this guys. I've opted to do two graphs on one page seeing as access doesn't like more than three things on a graph. If anyone can come up with how to do this then please post.

Pivots weren't giving me exactly what I wanted I'm afraid Gaz.

Thanks again for getting me unstuck and making me look for other avenues which all increase my learning in access.

Mwah.
 

Users who are viewing this thread

Back
Top Bottom