Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtotals and Totals in the output

Status
Not open for further replies.

iren

Technical User
Joined
Mar 8, 2005
Messages
106
Location
US
I have a table with the following fields:
Product
Gender
Proc
Dob
Srv_dt
Count_int_clm

I need to create a table with subtotals and total of int_count_clm as the following:

product Gender proc DOB Srv_dt Count_int_clm

HMO M 1111 12/14/1930 12/17/2007 1
12/15/1927 11/13/2007 1
12/17/1937 10/11/2007 2
SUBTOTAL 4
PPO F 4357 11/12/1935 5/6/2007 3
12/17/1940 6/3/2007 2
SUBTOTAL 5

TOTAL 9

How to implement it in Access? Could you please give me a hand!!!
Thank you in advance,,
Iren
 
you need to get a query that shows the information that you need and then in the report that will be displaying the query information, you can set up subtotals and totals based on changing products.



Leslie

In an open world there's no need for windows and gates
 
I did got a query with all information. However I have no idea how to get subtotals and totals based on that query in the manner I described. Could you please kindly explain me what steps should be taken after query has been built?
Thank you in advance.
Iren
 
Something like...
Code:
SELECT Field1, Field2, Sum(Field3) As Totals
FROM Table
GROUP BY Field1, Field2


Randy
 
you can't do it in the query, you can only do it in a report....

In re-reading your original post, I have to ask, why would you want to put that information into a table? you would have no idea that this
[tt]
proc DOB Srv_dt Count_int_clm
12/15/1927 11/13/2007 1[/tt]

has additional information:
[tt]
product Gender
HMO M [/tt]

Leslie
 
Randy,
How would that insert "subtotal" rows between each type of Product? The OP says:
[tt]
I need to create a table with subtotals and total of int_count_clm as the following:

product Gender proc DOB Srv_dt Count_int_clm

HMO M 1111 12/14/1930 12/17/2007 1
12/15/1927 11/13/2007 1
12/17/1937 10/11/2007 2
SUBTOTAL 4
PPO F 4357 11/12/1935 5/6/2007 3
12/17/1940 6/3/2007 2
SUBTOTAL 5

TOTAL 9[/tt]



Leslie

In an open world there's no need for windows and gates
 
Just trying to show her/him how to get totals in the query. I wouldn't store the information in a table, but would build the report from the query.


Randy
 
OK. Then what the steps should be taken to generate the report based on the query result?
 
As a starting point you may follow the report wizard.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top