DeadPixel81
New member
- Local time
- Today, 02:54
- Joined
- Aug 8, 2014
- Messages
- 9
Hi,
I am an Access newbie and I am looking for help with a problem I have encountered. Please see my attached image for a summary of the tables I am working with.
Basically, the complexity of this query is beyond my tiny intellect; and my research into nested queries, inner and outer joins and subqueries has left me more confused than anything.
Here is a brief summary of my tables:
Here is what I am trying to do:
Here is what I think that would look like, based on my summary picture with data:
1. All rows with a SubActivityStatus of 1 or 3 in tbl_FileStatus are selected.
2. The completion weight and ParentStage for each row is appended to the end, this is obtained from tbl_SubStages based on the tbl_FileStatus.[Substage_Reference_ID] = tbl_SubStages.[SubStage_ID].
3. The completion weight for each Substage is added together for each individual parent stage. So there are 2 parent stages: Drafting and Closing. All completion weight numbers for Drafting are added together for file number 54. Then all completion weight numbers for Closing are added together for file number 54. Then the same is done for file 57.
4. The files are checked against the tbl_Files using tbl_FileStatus.[File_Reference_ID]. I need to determine if the file has been checked off as being closed. If tbl_Files.[Closed] = True for a file, I need to remove that file from the selection.
I hope I am making sense. I tried to make this as easy to follow as possible. If any more information is required, please let me know. Any help or hints on where to look or how to get started would be greatly appreciated.
Thank you,
DeadPixel
I am an Access newbie and I am looking for help with a problem I have encountered. Please see my attached image for a summary of the tables I am working with.
Basically, the complexity of this query is beyond my tiny intellect; and my research into nested queries, inner and outer joins and subqueries has left me more confused than anything.
Here is a brief summary of my tables:
Code:
A [File] has multiple [Parent Stages] that has multiple [SubStages].
Each File is either open or closed.
Each Substage belongs to a Parent Stage and has a status of 1(Complete), 2(Incomplete),
3(Not Applicable). 3(Not Applicable) is included as Completed.
Each Substage has a 'completion weight' within its Parent Stage.
Here is what I am trying to do:
Code:
I want to pull all open files. For each file I want the summarized completion percentage of
each stage.
Here is what I think that would look like, based on my summary picture with data:
Code:
File_ID | Drafting | Closing | Buyer | Category
54 75% 50% Ange ITT
57 75% 100% Sienna RFP
1. All rows with a SubActivityStatus of 1 or 3 in tbl_FileStatus are selected.
2. The completion weight and ParentStage for each row is appended to the end, this is obtained from tbl_SubStages based on the tbl_FileStatus.[Substage_Reference_ID] = tbl_SubStages.[SubStage_ID].
3. The completion weight for each Substage is added together for each individual parent stage. So there are 2 parent stages: Drafting and Closing. All completion weight numbers for Drafting are added together for file number 54. Then all completion weight numbers for Closing are added together for file number 54. Then the same is done for file 57.
4. The files are checked against the tbl_Files using tbl_FileStatus.[File_Reference_ID]. I need to determine if the file has been checked off as being closed. If tbl_Files.[Closed] = True for a file, I need to remove that file from the selection.
I hope I am making sense. I tried to make this as easy to follow as possible. If any more information is required, please let me know. Any help or hints on where to look or how to get started would be greatly appreciated.
Thank you,
DeadPixel