View Single Post
  #4  
Old July 31st, 2007, 12:58 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Conditional format

Seabird wrote:


BTW, the standard expression to test for an even line number
is:
[rulenumber] Mod 2 = 0


What do you mean by this? I created my own solution that has always worked
by wouldn't mind to recode to standard.

Running Sum is set to Over Group on both reports....


In that case I don't see why it's not working unless there's
some kind of precision issue caused by the conversion of an
integer calculation to a floating point calculation (i.e. /2
and .5). I really doubt that's an issue, but it's difficult
to be sure with all the implied type casting in your
expression. I suggest that you make the text box visible so
you can see what its value is on each line.

Check the Mod operator in VBA Help for details, but
generally it just returns the remainder of the division
[rulenumber] / 2, so even numbers have a remainder of 0 and
odd numbers have a remainder of 1. It's a simpler
expression that does not rely on any type casting.

--
Marsh
MVP [MS Access]