Dsum need 1 field inside divisor calc
I have a Qry field:
TotalUsage: Val((Round(Nz([UomUsage])/DSum("Nz([UomUsage])","[tblDetail]",),4)*100))
the problem is that the DSUM needs to sum up all the like records using the same SubID. I need some extra code in the divisor part. EG
subID uomUsage TotalUsage
33 10 100
33 40 100
33 50 100
34 43 100
34 57 100
the dsum needs to use SubID in order to sum correcly EG on SubID 33 as 100 uomUsage.
SubID is a Number field, Long integer.
I am presently getting wrong info. the formula above Dsum is summing as 200 since i eroneously don't have Subid in the Qry calc.
How can i fix? Thanks
Penwood
I have a Qry field:
TotalUsage: Val((Round(Nz([UomUsage])/DSum("Nz([UomUsage])","[tblDetail]",),4)*100))
the problem is that the DSUM needs to sum up all the like records using the same SubID. I need some extra code in the divisor part. EG
subID uomUsage TotalUsage
33 10 100
33 40 100
33 50 100
34 43 100
34 57 100
the dsum needs to use SubID in order to sum correcly EG on SubID 33 as 100 uomUsage.
SubID is a Number field, Long integer.
I am presently getting wrong info. the formula above Dsum is summing as 200 since i eroneously don't have Subid in the Qry calc.
How can i fix? Thanks
Penwood
Last edited: