RE: Dsum calculation by date



Try this

SELECT qrySKEmergenceStats.DATE_SAMPLED, qrySKEmergenceStats.SumOfSKPERHR,
DSum("[qrySKEmergenceStats].[SumOfSKPERHR]","qrySKEmergenceStats","[date_sampled] <= #" & qrySKEmergenceStats.date_sampled & "#") AS CUMSUM_SKPERHR
FROM qrySKEmergenceStats;



"Beks" wrote:

> I have been trying to calculate a running sum for consecutive dates. My SQL
> for the query is as follows:
>
> SELECT qrySKEmergenceStats.DATE_SAMPLED, qrySKEmergenceStats.SumOfSKPERHR,
> (DSum("[qrySKEmergenceStats].[SumOfSKPERHR]","qrySKEmergenceStats","[date_sampled] <= " & qrySKEmergenceStats.date_sampled)) AS CUMSUM_SKPERHR
> FROM qrySKEmergenceStats;
>
> The query produces blank results. Thanks for your help!
>
.



Relevant Pages

  • Re: Dsum calculation by date
    ... If you do not mind a read-only results, ... rather than allenbrowne at mvps dot org. ... > FROM qrySKEmergenceStats; ... > The query produces blank results. ...
    (microsoft.public.access.queries)
  • RE: Dsum calculation by date
    ... YAHOO, it worked! ... "Ofer" wrote: ... >> FROM qrySKEmergenceStats; ... >> The query produces blank results. ...
    (microsoft.public.access.queries)
  • Dsum calculation by date
    ... I have been trying to calculate a running sum for consecutive dates. ... My SQL ... FROM qrySKEmergenceStats; ... The query produces blank results. ...
    (microsoft.public.access.queries)
  • Re: Can a crosstab query perform a running total?
    ... SQL view, so I haven't been able to figure out exactly how to utilize this ... this is the SQL information from the query that the crosstab ... [Monthly Inventory #1]., ... > You have to make the running sum BEFORE making the crosstab. ...
    (microsoft.public.access.queries)
  • Re: Multiple Totals in one Query
    ... the ControlSourc. ... Set the property to "Over Group" if you want to have each the Year or "Over All" if you want a running sum for the whole report. ... I have no problem doing either in a seperate query, but am having problems getting them into one query. ... Is there anyway to create a single query to do this using the Access query design form, or do I have to write this in SQL or join two queries? ...
    (microsoft.public.access.queries)