Grouping an Access report by a calculation/expression

  • Thread starter Thread starter Christopher Dean
  • Start date Start date
C

Christopher Dean

I am attempting to group a report of accounts by loyalty (i.e., <50%
loyal, <50% loyal, etc.). The LOYALTY field contains a numeric value
of loyalty for each record. The following syntax is not acceptable to
the Sorting and Grouping tool:

[Loyalty]>0.50

I have tried different variations of this syntax but nothing seems to
be working. Am I attempting something that is not possible? Any
suggestions? Thank you in advance!
 
You have to include "=" when you use an expression just like you would for a
control source of a text box. If you want to group by multiple values then
you will need an expression that returns multiple values. Your expression
will return only true and false resulting in two groups. To get multiple
groupings, you could get <25% <50% <75% and <100% by
=Int(Loyalty * 4)
 
Back
Top