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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping and Totaling Text Data

Status
Not open for further replies.

inspekta76

Technical User
Apr 11, 2008
10
CA
What I have in my report
Division Type # of Type Div.Tot. Share%
A Good 1 1
Good 1 1
Good 1 1
Bad 1 1
Bad 1 1
OK 1 1
6
B Good 1 1
Bad 1 1
Bad 1 1
OK 1 1
4


C Good 1 1
Bad 1 1
Bad 1 1
Bad 1 1
OK 1 1
OK 1 1
6
What I want
A Good 3 (%3of5)
Bad 2 (%2of7)
OK 1 (%1of4)
6
B Good 1 (%1of5)
Bad 2 (%2of7)
OK 1 (%1of4)
4


C Good 1 (%1of5)
Bad 3 (%3of7)
OK 2 (%2of4)
6

Totals Good 5
Bad 7
OK 4

16

Sorry for being primitive in explaining things (especially the formatting on the post...hope you can get the drift of things)...new to Access and VB codes, am a quick learner though.
Source for Type and Division is a query....
Thanks for any help that can be given, its greatly appreciated.
 
Change the Record Sourceof your report to something like:
Code:
SELECT Division, Type, Sum([# of Type]) As Qty
FROM tblNoName
GROUP BY Division, Type;

Then add a Footer if you don't have one.
Add a text box to the Division Footer
Name: txtSumDiv
Control Source: =Sum(Qty)

Then add a text box to the detail section:
Control Source: =Qty/txtSumDiv

For the report footer section, use a subreport bound to a record source like:
Code:
SELECT Type, Sum([# of Type]) As Qty
FROM tblNoName
GROUP BY Type;


Duane
Hook'D on Access
MS Access MVP
 
How are ya inspekta76 . . .

. . . [surprise] . . .

Be sure to parse thru one of the links at the bottom of my post.

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top