I need a sum of my contract totals, query, report, all I get is t.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field called contract totals, I know how to use a query to choose a
range of dates, but need a total in a chosen date criteria. What I've been
getting is just the first contract total, can't seem to get it to total the
entire field. Simple, just the totals, don't need it to break it down to
taxes, or anything else
just a simple total of one field. Help
 
Table Contracts: contractNum, date, contractTotal

SELECT Sum(contracts.contractTotal) AS SumOfcontractTotal
FROM contracts
WHERE (((contracts.date)>#1/1/2006# And (contracts.date)<#4/1/2006#));
 
What does your data structure look like? I can not see into your database.

Post an example of your data and what you expect the query results to look
like.
 
Date Sched- Name- Contract total- result
(date field) text field Currancy text field

I just need a total on the one field
I've tried using total in a query, and using a text field in a report, but
I'm just not getting it right.
 
Did Bruce Meneghin answer your question?

Jerre said:
Date Sched- Name- Contract total- result
(date field) text field Currancy text field

I just need a total on the one field
I've tried using total in a query, and using a text field in a report, but
I'm just not getting it right.
 
-- Is there a way that I can copy a few lines from my query into this reply
so you can see what I'm trying to do?
i have fields
Date sched - Canvaseer - Contract Total - result

the date sched is the date sold, canvasseer is an employee name, contract
total is a currancy total and is what I need the total amount for.

the only field I don't know how to work with is the contract total and it
will only give me the total for each record, not all the records which is
what I need.

In the query, there are 3 field for contract total, group by,
expression, and sum.


Jerre
 
Yes, highlight 3-4 row of data, CNTRL-C, and paste in post.

Also copy your SQL statement and post. Open the query in design view, click
 
SELECT [2006 Customer Tracking].[DATE SCHED], [2006 Customer
Tracking].Canvasser, [2006 Customer Tracking].[Funding Received], [2006
Customer Tracking].[Contract Total], [2006 Customer Tracking].[Contract
Total], [2006 Customer Tracking].RESULT
FROM [2006 Customer Tracking]
GROUP BY [2006 Customer Tracking].[DATE SCHED], [2006 Customer
Tracking].Canvasser, [2006 Customer Tracking].[Funding Received], [2006
Customer Tracking].[Contract Total], [2006 Customer Tracking].RESULT
HAVING ((([2006 Customer Tracking].[DATE SCHED]) Between #10/1/2006# And
#10/30/2006#) AND (([2006 Customer Tracking].RESULT)="sale"));

DATE SCHED Canvasser Funding Received Expr1003 Contract Total RESULT
10/2/2006 Andrew 05-Oct-06 $4,226.71 $4,226.71 Sale
10/2/2006 Tristan $8,179.17 $8,179.17 Sale
10/4/2006 Dex 05-Oct-06 $2,778.74 $2,778.74 Sale
10/5/2006 Dixon 06-Oct-06 $3,158.09 $3,158.09 Sale
10/5/2006 Internet 06-Oct-06 $3,056.04 $3,056.04 Sale
 
Your orignal post said --------Simple, just the totals, don't need it to
break it down to taxes, or anything elsejust a simple total of one field.

You can not total in a query and list the details at the same time unless
you use a subquery which is the same as using a separate query that is
joined.

What do you want besides the total to be displayed? You mentioned date
ranges, so which field do you want the date criteria and what would that be?

Jerre said:
SELECT [2006 Customer Tracking].[DATE SCHED], [2006 Customer
Tracking].Canvasser, [2006 Customer Tracking].[Funding Received], [2006
Customer Tracking].[Contract Total], [2006 Customer Tracking].[Contract
Total], [2006 Customer Tracking].RESULT
FROM [2006 Customer Tracking]
GROUP BY [2006 Customer Tracking].[DATE SCHED], [2006 Customer
Tracking].Canvasser, [2006 Customer Tracking].[Funding Received], [2006
Customer Tracking].[Contract Total], [2006 Customer Tracking].RESULT
HAVING ((([2006 Customer Tracking].[DATE SCHED]) Between #10/1/2006# And
#10/30/2006#) AND (([2006 Customer Tracking].RESULT)="sale"));

DATE SCHED Canvasser Funding Received Expr1003 Contract Total RESULT
10/2/2006 Andrew 05-Oct-06 $4,226.71 $4,226.71 Sale
10/2/2006 Tristan $8,179.17 $8,179.17 Sale
10/4/2006 Dex 05-Oct-06 $2,778.74 $2,778.74 Sale
10/5/2006 Dixon 06-Oct-06 $3,158.09 $3,158.09 Sale
10/5/2006 Internet 06-Oct-06 $3,056.04 $3,056.04 Sale

--
Jerre


Jerre said:
Date Sched- Name- Contract total- result
(date field) text field Currancy text field

I just need a total on the one field
I've tried using total in a query, and using a text field in a report, but
I'm just not getting it right.
 
Back
Top