MOD uses integer math.

Your divisor is rounded before the MOD operation.

In your example of 19 MOD 6.7, the 6.7 is rounded to 7.

The result of 19 MOD 7 is 5.

Hence 19 MOD 6.7 = 5, since 7*2 yields 14, and the remainder is 5.

In your second example:

103 \ 16 = 6

103 MOD 16 = 7

Check:

(16 * 6) + 7 = 103

--

Allen Browne - Microsoft MVP. Perth, Western Australia.

Tips for Access users -

http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike Reid" <ad******@tpg.com.au> wrote in message

news:9a********************************@4ax.com...

Appreciate any feedback on the MOD function. I am at a loss to

understand its "mathmatics".

From the help

Result = Number1 MOD Number2 where the result should be the remainder

of the division.

Create a quick form with 3 unbound fields where the values are all

stored as either double or long (doesnt seem to make any difference in

this case) a quick bit of code and we can play and see the results.

Ok lets try 19 Mod 6.7 in normal "maths" we end up with 2.835

(19/6.7)=2.835, we would expect to see the remainder as .8 however we

end up with .5

With 103 / 16 we would expect to see 6.437 (a remainder of .4),

however with the MOD function we get 7.

Obviously I'm missing something here