Prev: Update Query ?
Next: SQL Update and NOW
From: gandydancer1952 on 18 Mar 2010 19:33 I have a query for a Quarterly Report which separates and sums the Month of Quarters (ie. QTR1 = Jan, Feb, Mar. However the Mod 3 utilized in Northwind returns a result of 1,2,0 and fails to total the Mar records. How can I either find and modify the Mod 3 to 1,2,3 to match the VB Code or gather and total these records to allow me to utilize the Dialog Form provided in Northwind
From: John Spencer on 18 Mar 2010 20:38 As I replied earlier try the following expression 1 + ((Month(SomeDate)-1) Mod 3) That should return == 1 for Jan, April, July, and October == 2 for Feb, May, August, and November == 3 For March, June, September, and December If you need 0, 1, and 2 in place of 1,2, and 3 then don't add 1. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County gandydancer1952 wrote: > I have a query for a Quarterly Report which separates and sums the Month of > Quarters (ie. QTR1 = Jan, Feb, Mar. However the Mod 3 utilized in Northwind > returns a result of 1,2,0 and fails to total the Mar records. How can I > either find and modify the Mod 3 to 1,2,3 to match the VB Code or gather and > total these records to allow me to utilize the Dialog Form provided in > Northwind
|
Pages: 1 Prev: Update Query ? Next: SQL Update and NOW |