Kelli,
What you need is a plain select query with the Totals function turned on.
Start making a query on your table, get the truckID and Amount fields down
to the grid, then add two calculated ones like:
InvMonth: Month([Invoice Date])
InvYear: Year([Invoice Date])
These two will return the month and year respectivelyy, so you can use them
to filter on for a specific month or range of months.
Next, go to menu View > Totals, and notice the new line that appears in the
grid, headed Total:, defualted Group By for all fields. Leave Group By under
Truck ID, change it to Sum under amount, and leave it to Group By under the
two calculated fields if you want them to show, or change it to Where if you
don't.
HTH,
Nikos
Kelli McCann said:
I have three columns: truck ID, Invoice Date, and Amount. I am trying to
create a query that will give me one line with the following information :
the truck ID, (all of one month), and the sum of invoice amounts. I am
wanting a query to figure out cost per month. In my table I have all of our
trucks the invoice dates of maintenance and the invoice amount. For some
reason when I take a specific truck and one month (i.e. all of January) and
the amounts for all of htose invoice I can't seem to get it to create the
sum. Any suggestions would be greatly appreciated.