Forum Discussion
Dsum
- Nov 14, 2024
Hi,
The criteria concatenation in
DSum("Amount","tblDrawsDetails","FacIDfk=" & [FacIDfk] And [ID]<=[ID])) AS RunningSum
should be
DSum("Amount","tblDrawsDetails","FacIDfk=" & [FacIDfk] & " And ID<=" & [ID])) AS RunningSum
Servus
Karl
****************
Access Forever News DevCon
Access-Entwickler-Konferenz AEK
you can't use DSum() on your RunningSum because:
- there are ID that have big ID yet earlier date (maybe late entry?)
- there are dates that fall on the same date (facIDfk = 3 , sep-26-2023, 3 records).
so your last hope is the function i provided.
Hi Arnel,
Yes, you are correct with your points above.
I dont think #2 is as concerning though since I think <= on [DateRecd] would capture those records where they are on the same dates.
Could the function be revised to base it on the [DateRecd] instead of the [ID]? If too time consuming I can use the Dsum since it does work.
RunningSum: DSum("Amount","tblDrawsDetails","FacIDfk=" & [FacIDfk] & " And nz([DateRecd],0) <=" & Format$(Nz([DateRecd],0),"\#mm\/dd\/yyyy\#"))
thank you sir!