Number of records in a group - Access 2003

J

John Robinson

I have set up grouping of records in a report based on a numeric field with a
group interval of 6 and inserted calculated controls in the group footer with
the intention of displaying averages of each group of records. The
calculations are accurate but the first group only contains 5 records whereas
the second group is correct and has 6. If I change the interval to 3, for
example, the first group will only have 2 records and the second group will
have 3. I have examined the table, query and the report to find an
explanation of this behaviour with no luck. Anyone got any ideas?
 
D

Duane Hookom

I can't see anything wrong. This is possibly because I can't see anything.
Maybe you should share how you are creating your groups.
 
M

Marshall Barton

John said:
I have set up grouping of records in a report based on a numeric field with a
group interval of 6 and inserted calculated controls in the group footer with
the intention of displaying averages of each group of records. The
calculations are accurate but the first group only contains 5 records whereas
the second group is correct and has 6. If I change the interval to 3, for
example, the first group will only have 2 records and the second group will
have 3.


The grouping Interval is just shorthand for an expression
like:
=field \ Interval
so values 0 thru 5 will be in the first group, 6 thru 11 in
the second, etc.

If your values are not consecutive, there is no hope of
using the Interval to get equal size groups. If the values
are consecutive starting with 1, then group on the
expression:
=(field - 1) \ 6
with Interval set to 1
 

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