Solved

Access 2007 Grouping question

Posted on 2011-03-25
5
255 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
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 18

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now