Solved

Access 2007 Grouping question

Posted on 2011-03-25
5
284 Views
Last Modified: 2012-06-21
Hello,

I am working on creating a repot.  I need to add grouping to the report.  I know how to group on a field where ther are like terms... ie group on city name..

but... here is my question that I need help on..

I need to add grouping based on a value of a field.....

Each record has a rating number... 1 - 60...

I need to group.. ratings 44-60 togther
35 to 44 together
27 to 34 together
15 to 26 togther
0 to 14 togther

how can I do this grouping...

0
Comment
Question by:FaithDan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 16

Expert Comment

by:Sheils
ID: 35219446
Use a query with BETWEEN condition

eg:

SELECT * FROM TableName
WHERE Fieldname
BETWEEN 0 AND 14

0
 
LVL 16

Accepted Solution

by:
Sheils earned 500 total points
ID: 35219466
How you set it will depend on you report layout.

You may have a series of subreports each with its own query having different between condition

Alternatively you can bundle the between queries into a union query and display the result in single or multiple records report
0
 
LVL 1

Author Closing Comment

by:FaithDan
ID: 35219485
thanks...got it...
0
 
LVL 30

Expert Comment

by:hnasr
ID: 35219519
You may group on a calculated field in the query, named Range
Assume the field name: f1

Range: IIf([f1]>=44,"44-60",IIf([f1]>=35,"35-43",IIf([f1]>=27,"27-34",IIf([f1]>=15,"15-26","0-14"))))

In the report add group on Range
0
 
LVL 19

Expert Comment

by:Richard Daneke
ID: 35219538
The group feature in reports (AC2007) can group by 5s 10s 100s 1000s or fixed custom intervals.  You have a variable grouping.  So,

I would create a new field in a query to id the group with a compound IIF statement and group on this ID.  For Example, in QBE grid field name enter:

Group : IIF([Rating] < 14, "Group1",IIF([Rating] < 27, "Group2",IIF([Rating] < 35, "Group3",IIF([Rating] < 45, "Group4", IIF([Rating] < 61, "Group5", "UnGrouped")))))

This new field in your report query can now be used for report grouping.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question