Where are Mod's defined in databases

G

gandydancer1952

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
 
J

John Spencer

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
 

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