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

Sorting Problem 1

Status
Not open for further replies.

JJOHNS

MIS
Sep 12, 2001
171
US
I have four divisions. I also have a combo box with six choices. What I need is a report that groups by division, and returns a count of each selection from the combo box.
Like this:

Division1
FirstChoice 3
SecondChoice 4
ThirdChoice 5

etc.

What I'm getting is this:

Division1
FirstChoice 3


Division1
SecondChoice 4

Division1
ThirdChoice 5

etc.

I'm sure this is an easy one, but I'm lost. Can anyone tell me how to fix this report?

 
Open you report in Design view.
Go to View->Sorting and Grouping
In the Field/Expression combo box, select DivisionField
Sort Order=Ascending
Below, set Group Header to Yes.

Drag the division field to the group header section and run your report.

Regards,

Dan
[pipe]
 
Thanks Dan, but...

Right now I have the Sorting and Grouping like this:

Month ascending keep together = whole group
Division ascending keep together = whole group
Choice ascending keep together = whole group

I've been moving the stuff in and out of headers and detail and keep getting almost the same result, except the count changes. I don't know why this is so difficult. I guess MS Access just likes to show me who's boss every once in a while.

John


 
It's not Access, you're the boss.
Have you set Group headers/footers?
If not, do so. If yes...you have set the first grouping level to 'Month', so every time the month changes, all other groups are 'restarted'.

If you have the Choices in the table/query, but you want the 'CountOfChoices' on the report, set the Visible property for the Detail section to No, include an unbound text box in the 'Choices' group footer and set its control source to:
=Count([Choices])

Regards,

Dan
 
Thanks Dan,

I actually finally got it working yesterday afternoon, but your answer is the way I made it work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top