Sum Query

E

Ernst Guckel

Hello,

I have a table tblSales that has the following fields: DateID (Auto),
SalesDate, SalesTime, SalesAmount.

I am trying to create a query that sums all the sales for a specific date.
Add all the salesamounts per a salesdate. When I try this I get a sum query
that gives me all the times as well.. I do not want them ...

I am also trying to do the same thing within a specific time frame. From
the same table I would like all sames from 11am to 2pm...

Any help would be great.

Ernst.
 
A

Allen Browne

You already have a Totals query (Total button on toolbar is depressed), so
it probably looks something like this in design view:

Field SalesDate SalesTime SalesAmount
Total Group By Group By Total

Change the Total row under the SalesTime to:
Where
and add the criteria underneath it.
(If you don't need criteria, must omit this column.)

I'm assuming that SalesDate is the date only without any time component. If
it contains both date and time values, replace it in the field row with:
DateValue([SalesDate])
so that it groups by the dates without the times.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top