There is no Mode function in Access. It is possible to create one, however.
In the same way, there is no Median function in Access, but I created a
function similar to the built-in domain-aggregate functions (DMedian) that
will calculate it. (You can find the DMedian function here:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=Median.mdb)
A DMode() function would work much the same way, but the internal
calculation would be different, of course. Unfortunately, I don't know much
about calculating a mode, so maybe you could answer this.
I understand that the mode is the most common value in a list. So
Mode(1,1,2,2,6,6,6,6,7,12), the mode would be 6. But what happens if the
result is not unique? ie Mode(1,1,2,4,4) How do you break the tie? Are there
any other rules for handling exceptions?
--
--Roger Carlson
MS Access MVP
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L