Solved

Access 07 - Query - Cumulative By Each Day AND By 2 Other Criteria

Posted on 2014-02-16
4
228 Views
Last Modified: 2014-02-22
Hello all

Trying to soak all this in and going to next level thanks to all of you!

Had a lot of help today by Als315 getting me to be able to get a cumulative column calculating correctly and A LOT quicker than what I was trying to do...

Now I have a perplexing problem.

With that same background that I want it getting a cumulative field by Each Day as of the end of Each Shift I now would like to figure out how to get it to accumulate Each Day's Total as of the end of Each Shift AND FOR EACH TRANSTYPE.

Als315 showed me the qry_Cumul and Cumul0.  From that I am attempting to further refine query.

I created a qry_CumulByTranType that Inserts a TTypeID of 0 for each shift if there isn't any TransTypeID for that Shift (to avoid Null fields)

THEN....

Trying to get it to Sum Each Day at the End of Each Shift BY THAT TTypeID so that if, for example, Jan 2nd had 3 shifts and shift 1 of the day had NO Transactions of any type and Shift 2 had a TransTypeID of 6 and Shift 3 had a TransTypeID of 7 The cumulative result for my query for Jan 2nd would be:

Shift 1:
TType0 - CumulTAmt=0

Shift2:
TType6 - CumulTAmt=5685.55

Shift3:
TType6 - CumulTAmt=5685.55
TType7 -CumulTAmt=1789.96

In subsequent shifts for each Day if the ONLY TType in that Shift is 0 I would want it ignored.  But if the Preceeding Shift and the Current Shift both a 0 then the Current shift record should be TType 0.

Is this even possible?????
EE-Cumulative-Sum-ByType.accdb
0
Comment
Question by:wlwebb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 30

Expert Comment

by:hnasr
ID: 39863916
Until the previous helper can come to stage, I expect one query/table holding the columns to carry on.

So try to specify which query/table to look use.

Try to exclude all other irrelevant fields to this issue, then upload the database.
0
 

Author Comment

by:wlwebb
ID: 39864903
hnasr..

I thought i did:
I created a qry_CumulByTranType that Inserts a TTypeID of 0 for each shift if there isn't any TransTypeID for that Shift (to avoid Null fields)

(I left Als315's querys there so I wouldn't lose them and could refer back for my education)

That query feeds my "attempt" in query
qry_CumulByDayByTransTypeForDay which was my feeble attempt at trying to get it to do a Cumulative Sum column for EACH Shift & BusDay & TTypeID
0
 

Accepted Solution

by:
wlwebb earned 0 total points
ID: 39864992
NEVER MIND.........

I missed an " AND " in my final criteria which is why my result was #Error.
0
 

Author Closing Comment

by:wlwebb
ID: 39879017
Moderator please close & or delete
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question