I have a query that sums 3 other similar queries that sum slightly different data.
qry1 sums 40% of totalbeans of group 1
qry2 sums 60% of totalbeans of group 2
qry3 sums 100% of totalbeans of group3, group4 and group5
All are ordered by date and each query uses the same data but uses a "where" clause seperating the groups so that the right percentage is applied.
The final query (which causes the problems) sums the totalbeans or qry1, qry2 and qry3 ordered by date. Each preceding query shows one entry per day. The final query shows multiple entries per day multiplies the values as each date occurs several times, which is incorrect.
Here is the code:
The process was developed to show totalbeans under a group made up of a share of totalbean of other groups according to the percaentages.
I thank you all in advance. Let me know if you need more clarification.
Cheers,
David
qry1 sums 40% of totalbeans of group 1
qry2 sums 60% of totalbeans of group 2
qry3 sums 100% of totalbeans of group3, group4 and group5
All are ordered by date and each query uses the same data but uses a "where" clause seperating the groups so that the right percentage is applied.
The final query (which causes the problems) sums the totalbeans or qry1, qry2 and qry3 ordered by date. Each preceding query shows one entry per day. The final query shows multiple entries per day multiplies the values as each date occurs several times, which is incorrect.
Here is the code:
Code:
Sum(((Nz(qry1!totalbeans,0)+(Nz(qry2!totalbeans,0)+(NZ(qry3!totalbeans,0)
The process was developed to show totalbeans under a group made up of a share of totalbean of other groups according to the percaentages.
I thank you all in advance. Let me know if you need more clarification.
Cheers,
David