Group groups

R

rob p

In Access I have grouping by dept. I have depts 10, 20, 30, 40 and 50. How
can I make group breaks at 10, 30 and 50 only? I want 20 & 30 together and
40 and 50 together.
Thanks.
 
P

PC Datasheet

Rob,

Add another field called GroupBreak to your Department table. Make your
department table look like:

DeptID DeptNum GroupBreak
1 10 A
2 20 B
3 30 B
4 40 C
5 50 C

Include GroupBreak in your query that is the basis of your report. Now group on
GroupBreak rather than DeptNum.
 
J

John Spencer (MVP)

Calculate the break as
(Dept+10) \ 20
That will give

Dept Value
10 1
20 1
30 2
40 2
50 3
60 3
 
R

rob p

I can go into my query and create a field called groupbreak. It would be in
field row as ??? groupbreak: ??? And also I presume I would have totals on
and option would say "group by".

I am pulling in records with dept numbers already assigned so I need some
formula in "CRITERIA???" row that would say look at dept numbers and if dept
number is 10 then groupbreak is A, if dept number is 20 or 30 then
groupbreak is B, etc... ?? How do I write that into a formula for
groupbreak?
thanks much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top