Solved

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

Posted on 2014-02-16
4
223 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
  • 3
4 Comments
 
LVL 30

Expert Comment

by:hnasr
Comment Utility
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
Comment Utility
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
Comment Utility
NEVER MIND.........

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

Author Closing Comment

by:wlwebb
Comment Utility
Moderator please close & or delete
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now