I want a formula where i can get to know the total amount spent on each vehicle
Below is the screenshot for reference.
I want a formula where i can get to know the total amount spent on each vehicle
Below is the screenshot for reference.
You don't use DSUM in a query. The query does the sum.
turn on query summation (on the toolbar),and put SUM under the amount fields.
Hi Ranman,
Thank you so much. I have followed your instructions and was able to get the total.
My Requirement is to get the total amount spent on each vehicle as there are multiple entries of each vehicle number in database. below is the screenshot. May be my approach is wrong in calculating. Request your help on this please
Below is the correct screenshot of first image.
If you want total cost by vehicle, then do not group by driver.
You have to be clear on what exactly should be summed. In post #4 you have SumOfCost and TotalCost (same values??)
Hi Orange,
My Apologize, by mistake i summed the field of "Cost". My Basic requirement is to show the total amount spent on each vehicle on form.
below are the correct screenshots.
When your lat post is for what you want, then you must not calculate total costs in query. You have to use DSum() to calculate total amount for unbound control in form.
As Arvil said, use DSum() in textbox on form - not a query.
On a report - use Sorting & Grouping features with aggregate calc in footer textbox.
BTW, looks like misspelling in field name Voilations - should be Violations
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.