Group groups

  • Thread starter Thread starter rob p
  • Start date Start date
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.
 
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.
 
Calculate the break as
(Dept+10) \ 20
That will give

Dept Value
10 1
20 1
30 2
40 2
50 3
60 3
 
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.
 
Back
Top