Gustav Brock
gustav at cactus.dk
Fri Jan 16 13:03:53 CST 2004
Hi Gary Or: CancelledLineCount: Sum(-[CancelFlag]) CancelledLineCount: -Sum([CancelFlag]) However, in these days where you cannot be sure wether True is 1 or -1, I prefer Charlotte's method myself - prepares for portable code. /gustav > To each their own. More than one way to skin a fish. Six of one, half dozen > of the other. ;-) > No you don't need to reverse the sign, but if you are just printing or > e-mailing the query results as I mostly do, it is a easy way to get it > looking right. >>You don't even need to do that. Just use an Abs() function to return a >>positive value. >>In your totals query do a sum on the Yes/No field times -1 to reverse >>the sign. ( -1 = Yes) >> >>CancelledLineCount: Sum([CancelFlag]*-1)