Access Query Help

Associate
Joined
27 Jan 2005
Posts
830
I have a Access 2003 database which I need some query help.

I have a table that has data for storage of vehicles which consists of 'date out' and various financial fields.

I need to do a query that gives me a specific finacial total for a specific date.

In the query 'date out' I have set criteria to Between #01/11/2008# And #31/10/2009#

That works, but when I apply sum to the total row of 'recovery', which is the field that stores money data it adds the money up for that specic date in a way I don't want it to. What happens when the query runs it has rows for every date and total the total for that date i.e all the monies for 31/10/2008 then 01/11/2008, 02/11/200 etc until 31/10/2009. What I want is one row that gives me the total monies for 'recovery' bewween 01/11/2008 and 31/10/2009.

Anyone give me points and I would be very grateful, thanks.
 
If you are using the query grid, for the column in the grid that you have entered your date range, change the grouping option from "Group" or "Sum" or whatever it is set to to "Where" and remove the tick from the box that sets the option to display the field.

Then when your query runs you will have a grand total for the period you selected without the dates splitting it into numerous values.


Rgds
Binty
 
The SQL for your query is pasted below, all you need to do is change the table names and field names etc and it will work for your query and table.

SELECT Sum(T_OcUK.Recoveries) AS Recoveries
FROM T_OcUK
WHERE (((T_OcUK.[Date Out]) Between #11/1/2008# And #10/31/2009#));


Rgds
Binty
 
Last edited:
Back
Top Bottom